@kici-dev/engine 0.7.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. package/dist/context/hold-reason.d.ts +6 -11
  2. package/dist/context/hold-reason.js +1 -8
  3. package/dist/context/index.d.ts +3 -3
  4. package/dist/context/index.js +3 -3
  5. package/dist/context/types.d.ts +12 -10
  6. package/dist/context/types.js +12 -14
  7. package/dist/index.d.ts +1 -0
  8. package/dist/index.js +7 -6
  9. package/dist/metrics/catalog-policy.js +2 -2
  10. package/dist/protocol/dashboard-write-operations.d.ts +8 -18
  11. package/dist/protocol/dashboard-write-operations.js +5 -26
  12. package/dist/protocol/messages/agent-run-result.d.ts +0 -1
  13. package/dist/protocol/messages/auth.d.ts +3 -3
  14. package/dist/protocol/messages/capabilities.d.ts +3 -5
  15. package/dist/protocol/messages/capabilities.js +4 -10
  16. package/dist/protocol/messages/dashboard-global-workflows.d.ts +10 -24
  17. package/dist/protocol/messages/dashboard-global-workflows.js +9 -15
  18. package/dist/protocol/messages/dashboard.d.ts +4 -23
  19. package/dist/protocol/messages/dashboard.js +4 -22
  20. package/dist/protocol/messages/oidc-token-relay.d.ts +2 -13
  21. package/dist/protocol/messages/oidc-token-relay.js +3 -10
  22. package/dist/protocol/messages/orchestrator-agent.d.ts +24 -9
  23. package/dist/protocol/messages/orchestrator-agent.js +24 -28
  24. package/dist/protocol/messages/peer.d.ts +26 -31
  25. package/dist/protocol/messages/peer.js +18 -38
  26. package/dist/protocol/messages/platform-orchestrator.d.ts +17 -79
  27. package/dist/protocol/messages/platform-orchestrator.js +6 -24
  28. package/dist/protocol/version.d.ts +10 -18
  29. package/dist/protocol/version.js +11 -19
  30. package/dist/provenance/id-token-claim-names.d.ts +13 -0
  31. package/dist/provenance/id-token-claim-names.js +44 -0
  32. package/dist/provenance/id-token-event-claims.d.ts +1 -8
  33. package/dist/provenance/id-token-event-claims.js +2 -7
  34. package/dist/provider/index.d.ts +1 -2
  35. package/dist/provider/index.test-d.d.ts +2 -0
  36. package/dist/provider/index.test-d.js +31 -0
  37. package/dist/provider/lock-file-fetcher.d.ts +8 -0
  38. package/dist/provider/webhook-normalizer.d.ts +0 -42
  39. package/dist/trigger/types.d.ts +8 -38
  40. package/dist/trigger/types.js +2 -12
  41. package/dist/trigger/types.test-d.d.ts +2 -0
  42. package/dist/trigger/types.test-d.js +63 -0
  43. package/package.json +7 -11
  44. package/sbom.spdx.json +20 -20
  45. package/dist/protocol/messages/oidc-mint.d.ts +0 -58
  46. package/dist/protocol/messages/oidc-mint.js +0 -62
  47. package/dist/provider/contributor-resolver.d.ts +0 -30
  48. package/dist/provider/contributor-resolver.js +0 -2
@@ -1,62 +0,0 @@
1
- import "../../rolldown-runtime-ClRpJifh.js";
2
- import { AttestationOrigin } from "../../provenance/attestation-origin.js";
3
- import { z } from "zod";
4
- //#region src/protocol/messages/oidc-mint.ts
5
- /**
6
- * @deprecated The `oidc.mint.*` RPC pair (Platform-rooted identity mint) is
7
- * hard-deprecated in favor of orchestrator-owned signing. It is kept
8
- * wire-compatible for the mixed-version rollout window and removed at v1.0; a
9
- * fresh orchestrator with its own signer never sends it. See
10
- * docs/user/deprecations.md.
11
- */
12
- /**
13
- * Error discriminator for a failed provenance mint, carried on
14
- * `oidc.mint.response.error.code`. Mirrors the three orchestrator-side error
15
- * classes that consume it:
16
- * rejected -> run/job missing or job terminal (MintRejectedError)
17
- * unavailable -> the Platform signer/issuer is not configured (MintUnavailableError)
18
- * failed -> any other Platform-side failure (MintRelayError)
19
- */
20
- const OidcMintErrorCode = z.enum([
21
- "rejected",
22
- "unavailable",
23
- "failed"
24
- ]);
25
- /** orchestrator -> Platform: request a short-lived OIDC ID token for a job. */
26
- const oidcMintRequestSchema = z.object({
27
- type: z.literal("oidc.mint.request"),
28
- requestId: z.string().min(1),
29
- orchestratorId: z.string().min(1),
30
- runId: z.string().min(1),
31
- jobId: z.string().min(1),
32
- audience: z.string().min(1).max(255),
33
- /**
34
- * Deferred fulfilment (attest-later): when true, the mint knowingly targets a
35
- * completed job and binds `statementHash` + `origin` into the token. Absent
36
- * for the live agent path. `orgId` is never on the wire — the Platform derives
37
- * it from the authenticated connection.
38
- */
39
- deferred: z.literal(true).optional(),
40
- /** SHA-256 of the frozen DSSE statement the deferred token binds to. */
41
- statementHash: z.string().optional(),
42
- /** Mint-timing origin for a deferred fulfilment (never `live` here). */
43
- origin: AttestationOrigin.extract(["deferred", "offline-backfill"]).optional()
44
- });
45
- /** Platform -> orchestrator: the minted token or a typed error (exactly one). */
46
- const oidcMintResponseSchema = z.object({
47
- type: z.literal("oidc.mint.response"),
48
- requestId: z.string().min(1),
49
- result: z.object({
50
- token: z.string().min(1),
51
- expiresIn: z.number().int().positive(),
52
- jti: z.string().min(1)
53
- }).optional(),
54
- error: z.object({
55
- code: OidcMintErrorCode,
56
- message: z.string()
57
- }).optional()
58
- }).refine((m) => m.result === void 0 !== (m.error === void 0), { message: "oidc.mint.response must carry exactly one of result | error" });
59
- //#endregion
60
- export { OidcMintErrorCode, oidcMintRequestSchema, oidcMintResponseSchema };
61
-
62
- //# sourceMappingURL=oidc-mint.js.map
@@ -1,30 +0,0 @@
1
- /**
2
- * ContributorResolver interface for determining contributor permissions.
3
- *
4
- * Deprecated in favour of ref-based trust: the whole interface, including the
5
- * `ContributorPermission` / `ContributorInfo` shapes it carries, is retained
6
- * for compatibility and has no caller in this repo.
7
- */
8
- import type { ProviderType } from './types.js';
9
- /** Contributor's permission level on a repository. */
10
- export type ContributorPermission = 'admin' | 'write' | 'read' | 'none';
11
- /** Information about a contributor and their relationship to a PR. */
12
- export interface ContributorInfo {
13
- username: string;
14
- permission: ContributorPermission;
15
- /** Whether the PR comes from a fork */
16
- isForkPR: boolean;
17
- }
18
- /**
19
- * Resolves contributor information from a git hosting provider.
20
- *
21
- * @deprecated Trust is derived from the git ref, not from the contributor's
22
- * permission level, so nothing in the webhook pipeline calls a resolver. The
23
- * type stays exported for wire compatibility with external implementations and
24
- * is removed at v1.0.0.
25
- */
26
- export interface ContributorResolver {
27
- readonly provider: ProviderType;
28
- resolveContributor(repoIdentifier: string, username: string, credentials: unknown): Promise<ContributorInfo>;
29
- }
30
- //# sourceMappingURL=contributor-resolver.d.ts.map
@@ -1,2 +0,0 @@
1
- import "../rolldown-runtime-ClRpJifh.js";
2
- export {};