Cotal TypeScript packages
    Preparing search index...

    Function startAuthService

    • Start one account-scoped auth-service context. Every input is explicit: the state dir, the injected store with its proved identity, the assigned data account and the broker. The context installs no process signal handler, never exits the process, never selects a root from cwd, and has no local manager. It returns only after the authority plane, the callout subscription and the loopback listener are bound. A failed start releases what it acquired and throws. A mid-life fence or broker loss makes only this context unavailable and closes its resources. close() rejects when the context did not release its plane claim (SPEC 13.13): the row was no longer its own, or the release write failed. A retryable release refusal keeps the barrier open so close() can be retried after reconnection; the context stays draining.

      Parameters

      • inputs: HostedContextInputs & {
            calloutLimits?: AuthCalloutLimits;
            connectLimits?: Partial<ConnectLimits>;
            issuerSessionTtlSeconds?: number;
            platformControl?: PlatformControlInput;
            platformSupervisor?: PlatformSupervisorInput;
            port?: number;
            publicFace?: PublicFaceInput;
            registry?: RegistryService;
            registryCredentialTtlSeconds?: number;
            serviceEndpoints?: {
                callerPayload?: ServiceCallerPayloadBootstrap;
                startup: NonNullable<
                    | { kind: "normal" }
                    | { kind: "restore"; restoreId: string }
                    | undefined,
                >;
            };
            standingRenewableTtlSeconds?: number;
            toolResultConsents?: ToolResultConsentSignerOptions;
        }
        • OptionalcalloutLimits?: AuthCalloutLimits

          This context's callout limits. authTimeoutMs must match the broker's authorization { timeout }. Absent: every default. No CLI flag sets it.

        • OptionalconnectLimits?: Partial<ConnectLimits>

          Trusted-host only: connects a minute per actor, per owner and per client host whose bearer does not verify. Absent fields keep the defaults, 60, 600 and 60. No CLI flag sets it.

        • OptionalissuerSessionTtlSeconds?: number

          Trusted-host only. Forwarded unchanged to openAuthAuthorityPlane, which bounds it to 5..300 seconds. Absent: the five-minute default. No CLI flag and no request field sets it.

        • OptionalplatformControl?: PlatformControlInput

          Present only in a platform composition. Absent: the handle has no platform control door.

        • OptionalplatformSupervisor?: PlatformSupervisorInput

          Host-authenticated administrative issuance for one owner's supervisor, with no human login.

        • Optionalport?: number
        • OptionalpublicFace?: PublicFaceInput

          Absent: the handle has no publicUrl and nothing serves the discovery bundle.

        • Optionalregistry?: RegistryService

          Default off. Auth hosts this registry using this context's own assigned secret store.

        • OptionalregistryCredentialTtlSeconds?: number

          Trusted-host-only credential lifetime for registry renewal rehearsal, 5..900 seconds.

        • OptionalserviceEndpoints?: {
              callerPayload?: ServiceCallerPayloadBootstrap;
              startup: NonNullable<
                  { kind: "normal" }
                  | { kind: "restore"; restoreId: string }
                  | undefined,
              >;
          }

          Default off. Forwarded unchanged to openAuthAuthorityPlane. No CLI flag sets it.

        • OptionalstandingRenewableTtlSeconds?: number

          Trusted-host only. Forwarded unchanged to openAuthAuthorityPlane, which bounds it to 5..86400 seconds. Absent: the 24h default. No CLI flag and no request field sets it.

        • OptionaltoolResultConsents?: ToolResultConsentSignerOptions

          Opt-in trusted-host consent signer, with seed material already in the private store.

      Returns Promise<AuthServiceHandle>