Skip to content
Sarj Workspace Sync

execution/inactive-identity-evidence

@sarj-ai/workspace-sync/execution/inactive-identity-evidence ยท Source

import { z } from "zod";
import { GitHubAccessAuditClient, type GitHubIdentitySeedSnapshot } from "../github-access-audit/git-hub-access-audit-client.ts";
import { type GoogleDirectoryClient } from "../org-sync/google-directory-client.ts";
import type { GoogleDirectoryUser } from "../org-sync/model.ts";
import type { WorkspaceSyncRuntimeBindings } from "./provider-runtime-ports.ts";
import type { WorkspaceRuntimeConfiguration as ValidatedEnv } from "./runtime-configuration.ts";
export declare const InactiveGithubIdentityEvidenceSchema: z.ZodObject<{
diagnosticOnly: z.ZodLiteral<true>;
writesAttempted: z.ZodLiteral<0>;
observedAt: z.ZodISODateTime;
sourceComplete: z.ZodBoolean;
issues: z.ZodArray<z.ZodEnum<{
duplicate_inventory_identity: "duplicate_inventory_identity";
google_authority_anchor_unverified: "google_authority_anchor_unverified";
inventory_below_floor: "inventory_below_floor";
result_limit_exceeded: "result_limit_exceeded";
source_incomplete: "source_incomplete";
}>>;
sourceHash: z.ZodNullable<z.ZodString>;
identities: z.ZodArray<z.ZodObject<{
googleUserId: z.core.$ZodBranded<z.ZodString, "GoogleUserId", "out">;
primaryEmail: z.ZodEmail;
lifecycle: z.ZodEnum<{
archived: "archived";
deleted: "deleted";
suspended: "suspended";
}>;
accountAccess: z.ZodLiteral<"unknown">;
blocker: z.ZodNullable<z.ZodEnum<{
github_identity_mismatch: "github_identity_mismatch";
github_identity_unavailable: "github_identity_unavailable";
github_protected_role: "github_protected_role";
google_identity_ambiguous: "google_identity_ambiguous";
google_mapping_conflict: "google_mapping_conflict";
google_protected_or_unknown: "google_protected_or_unknown";
saml_identity_ambiguous: "saml_identity_ambiguous";
saml_identity_incomplete: "saml_identity_incomplete";
saml_missing: "saml_missing";
}>>;
pairing: z.ZodNullable<z.ZodObject<{
githubUserId: z.core.$ZodBranded<z.ZodString, "GitHubUserId", "out">;
githubLogin: z.core.$ZodBranded<z.ZodPipe<z.ZodString, z.ZodTransform<string, string>>, "GitHubLogin", "out">;
nameIdMatch: z.ZodEnum<{
alias: "alias";
primary: "primary";
}>;
membership: z.ZodEnum<{
"current-member": "current-member";
"not-current-member": "not-current-member";
}>;
}, z.core.$strict>>;
}, z.core.$strict>>;
}, z.core.$strict>;
export type InactiveGithubIdentityEvidence = z.output<typeof InactiveGithubIdentityEvidenceSchema>;
export declare function inspectInactiveGithubIdentities(bindings: WorkspaceSyncRuntimeBindings, env: ValidatedEnv): Promise<{
diagnosticOnly: true;
writesAttempted: 0;
observedAt: string;
sourceComplete: boolean;
issues: ("duplicate_inventory_identity" | "google_authority_anchor_unverified" | "inventory_below_floor" | "result_limit_exceeded" | "source_incomplete")[];
sourceHash: string | null;
identities: {
googleUserId: string & z.$brand<"GoogleUserId">;
primaryEmail: string;
lifecycle: "archived" | "deleted" | "suspended";
accountAccess: "unknown";
blocker: "github_identity_mismatch" | "github_identity_unavailable" | "github_protected_role" | "google_identity_ambiguous" | "google_mapping_conflict" | "google_protected_or_unknown" | "saml_identity_ambiguous" | "saml_identity_incomplete" | "saml_missing" | null;
pairing: {
githubUserId: string & z.$brand<"GitHubUserId">;
githubLogin: string & z.$brand<"GitHubLogin">;
nameIdMatch: "alias" | "primary";
membership: "current-member" | "not-current-member";
} | null;
}[];
}>;
export declare function inspectInactiveGithubIdentitiesFromSources(sources: {
google: Pick<GoogleDirectoryClient, "listAllUsers" | "listDeletedUsers">;
github: Pick<GitHubAccessAuditClient, "captureIdentitySeed">;
resolveGithubUser(login: string, deadline: number): Promise<unknown>;
}): Promise<{
diagnosticOnly: true;
writesAttempted: 0;
observedAt: string;
sourceComplete: boolean;
issues: ("duplicate_inventory_identity" | "google_authority_anchor_unverified" | "inventory_below_floor" | "result_limit_exceeded" | "source_incomplete")[];
sourceHash: string | null;
identities: {
googleUserId: string & z.$brand<"GoogleUserId">;
primaryEmail: string;
lifecycle: "archived" | "deleted" | "suspended";
accountAccess: "unknown";
blocker: "github_identity_mismatch" | "github_identity_unavailable" | "github_protected_role" | "google_identity_ambiguous" | "google_mapping_conflict" | "google_protected_or_unknown" | "saml_identity_ambiguous" | "saml_identity_incomplete" | "saml_missing" | null;
pairing: {
githubUserId: string & z.$brand<"GitHubUserId">;
githubLogin: string & z.$brand<"GitHubLogin">;
nameIdMatch: "alias" | "primary";
membership: "current-member" | "not-current-member";
} | null;
}[];
}>;
export declare function projectInactiveGithubIdentities(users: readonly GoogleDirectoryUser[], github: GitHubIdentitySeedSnapshot, observedAt: string, resolveGithubUser: (login: string) => Promise<unknown>): Promise<InactiveGithubIdentityEvidence>;