@kitman-sh/sdk 0.0.0-stage → 0.6.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 (102) hide show
  1. package/dist/build/index.js +215 -0
  2. package/dist/chunk-f3d6cvkg.js +958 -0
  3. package/dist/chunk-jnxc0c54.js +3963 -0
  4. package/dist/loop/index.js +193 -0
  5. package/dist/program/index.js +24 -0
  6. package/package.json +29 -4
  7. package/types/packages/core/src/a2a.d.ts +577 -0
  8. package/types/packages/core/src/agent-capabilities.d.ts +1424 -0
  9. package/types/packages/core/src/agent-environment.d.ts +2429 -0
  10. package/types/packages/core/src/agent-launch-snapshot.d.ts +44 -0
  11. package/types/packages/core/src/agent-sandbox-policy.d.ts +31 -0
  12. package/types/packages/core/src/approval-queue.d.ts +126 -0
  13. package/types/packages/core/src/audit.d.ts +52 -0
  14. package/types/packages/core/src/change-delivery.d.ts +39 -0
  15. package/types/packages/core/src/change-request-review.d.ts +146 -0
  16. package/types/packages/core/src/change-request.d.ts +432 -0
  17. package/types/packages/core/src/common.d.ts +6 -0
  18. package/types/packages/core/src/connection.d.ts +33 -0
  19. package/types/packages/core/src/context-feedback.d.ts +89 -0
  20. package/types/packages/core/src/context-pack.d.ts +182 -0
  21. package/types/packages/core/src/crypto.d.ts +11 -0
  22. package/types/packages/core/src/data-lifecycle.d.ts +195 -0
  23. package/types/packages/core/src/decision.d.ts +48 -0
  24. package/types/packages/core/src/delivery-operation.d.ts +125 -0
  25. package/types/packages/core/src/delivery-policy.d.ts +174 -0
  26. package/types/packages/core/src/engineering-resources.d.ts +26 -0
  27. package/types/packages/core/src/enterprise-code-host.d.ts +21 -0
  28. package/types/packages/core/src/epic-delivery.d.ts +38 -0
  29. package/types/packages/core/src/extension.d.ts +35 -0
  30. package/types/packages/core/src/external-effect.d.ts +313 -0
  31. package/types/packages/core/src/fix-flow.d.ts +149 -0
  32. package/types/packages/core/src/following.d.ts +59 -0
  33. package/types/packages/core/src/github-delivery-fixtures.d.ts +28 -0
  34. package/types/packages/core/src/github-delivery.d.ts +78 -0
  35. package/types/packages/core/src/gitlab-delivery-fixtures.d.ts +26 -0
  36. package/types/packages/core/src/gitlab-delivery.d.ts +76 -0
  37. package/types/packages/core/src/global-search.d.ts +42 -0
  38. package/types/packages/core/src/id.d.ts +1 -0
  39. package/types/packages/core/src/index.d.ts +74 -0
  40. package/types/packages/core/src/integration.d.ts +137 -0
  41. package/types/packages/core/src/intent.d.ts +260 -0
  42. package/types/packages/core/src/json.d.ts +10 -0
  43. package/types/packages/core/src/kit-taxonomy.d.ts +21 -0
  44. package/types/packages/core/src/kit.d.ts +1489 -0
  45. package/types/packages/core/src/live.d.ts +8309 -0
  46. package/types/packages/core/src/loop-layers.d.ts +59 -0
  47. package/types/packages/core/src/loop-version.d.ts +59 -0
  48. package/types/packages/core/src/loop.d.ts +3076 -0
  49. package/types/packages/core/src/me.d.ts +31 -0
  50. package/types/packages/core/src/memory.d.ts +88 -0
  51. package/types/packages/core/src/my-teams.d.ts +1230 -0
  52. package/types/packages/core/src/notification.d.ts +181 -0
  53. package/types/packages/core/src/observability.d.ts +175 -0
  54. package/types/packages/core/src/package-declarations.d.ts +427 -0
  55. package/types/packages/core/src/package.d.ts +369 -0
  56. package/types/packages/core/src/personal-development-profile.d.ts +11 -0
  57. package/types/packages/core/src/platform-release.d.ts +60 -0
  58. package/types/packages/core/src/program-credential.d.ts +10 -0
  59. package/types/packages/core/src/project.d.ts +64 -0
  60. package/types/packages/core/src/proposal.d.ts +292 -0
  61. package/types/packages/core/src/provider-safe-text.d.ts +2 -0
  62. package/types/packages/core/src/redaction.d.ts +73 -0
  63. package/types/packages/core/src/repo-binding.d.ts +123 -0
  64. package/types/packages/core/src/run-journal.d.ts +28 -0
  65. package/types/packages/core/src/run-launch.d.ts +67 -0
  66. package/types/packages/core/src/run.d.ts +566 -0
  67. package/types/packages/core/src/runner-eligibility.d.ts +39 -0
  68. package/types/packages/core/src/runner-routing.d.ts +11 -0
  69. package/types/packages/core/src/runner-trust.d.ts +67 -0
  70. package/types/packages/core/src/runner.d.ts +3672 -0
  71. package/types/packages/core/src/runtime-type.d.ts +36 -0
  72. package/types/packages/core/src/schedule.d.ts +136 -0
  73. package/types/packages/core/src/schema.d.ts +89 -0
  74. package/types/packages/core/src/scope-directory.d.ts +100 -0
  75. package/types/packages/core/src/secret.d.ts +37 -0
  76. package/types/packages/core/src/session.d.ts +90 -0
  77. package/types/packages/core/src/step-brief.d.ts +50 -0
  78. package/types/packages/core/src/sync-kit.d.ts +587 -0
  79. package/types/packages/core/src/task-detail.d.ts +491 -0
  80. package/types/packages/core/src/task-execution-record.d.ts +620 -0
  81. package/types/packages/core/src/task-key.d.ts +9 -0
  82. package/types/packages/core/src/task.d.ts +543 -0
  83. package/types/packages/core/src/trigger-dispatch.d.ts +421 -0
  84. package/types/packages/core/src/work-unit.d.ts +725 -0
  85. package/types/packages/core/src/workspace.d.ts +50 -0
  86. package/types/packages/live/src/rpc/runner-client.d.ts +938 -0
  87. package/types/packages/live/src/rpc/runner-group.d.ts +730 -0
  88. package/types/packages/sdk/src/build/index.d.ts +45 -0
  89. package/types/packages/sdk/src/loop/activities.d.ts +187 -0
  90. package/types/packages/sdk/src/loop/check.d.ts +39 -0
  91. package/types/packages/sdk/src/loop/config.d.ts +68 -0
  92. package/types/packages/sdk/src/loop/define.d.ts +69 -0
  93. package/types/packages/sdk/src/loop/evidence.d.ts +66 -0
  94. package/types/packages/sdk/src/loop/index.d.ts +9 -0
  95. package/types/packages/sdk/src/loop/plan.d.ts +43 -0
  96. package/types/packages/sdk/src/loop/review.d.ts +86 -0
  97. package/types/packages/sdk/src/loop/steps.d.ts +224 -0
  98. package/types/packages/sdk/src/loop/test-loop.d.ts +112 -0
  99. package/types/packages/sdk/src/program/engine.d.ts +144 -0
  100. package/types/packages/sdk/src/program/host.d.ts +48 -0
  101. package/types/packages/sdk/src/program/index.d.ts +2 -0
  102. package/README.md +0 -3
@@ -0,0 +1,292 @@
1
+ import * as Schema from 'effect/Schema';
2
+ export declare const ProposalStatuses: readonly ['proposed', 'in_review', 'approved', 'rejected', 'applied', 'reverted', 'superseded', 'canceled'];
3
+ export declare const KitMarketplaceProposalTargetTypes: readonly ['kit_source', 'kit_version', 'kit_installation', 'kit_activation', 'kit_trust_policy'];
4
+ export declare const KitMarketplaceProposalActions: readonly ['source_publish', 'version_publish', 'source_update', 'trust_change', 'visibility_change', 'broad_activation', 'risky_agent_environment_effect', 'rollback'];
5
+ export declare const ProposalTargetTypes: readonly ["memory", "kit", "agent_environment_policy", "decision", "task", "project_context", "context_relevance", "kit_source", "kit_version", "kit_installation", "kit_activation", "kit_trust_policy"];
6
+ export declare const ProposalRiskLevels: readonly ['low', 'medium', 'high'];
7
+ export declare const ProposalApprovalPolicyModes: readonly ['auto_approve_low_risk', 'require_other_project_member', 'require_workspace_owner_or_admin'];
8
+ export declare const ProposalPolicyViolationCodes: readonly ['autonomous_self_approval', 'self_capability_escalation', 'missing_required_approval', 'unsafe_payload', 'target_conflict'];
9
+ export declare const ProposalStatus: Schema.Literals<readonly ["proposed", "in_review", "approved", "rejected", "applied", "reverted", "superseded", "canceled"]>;
10
+ export declare const ProposalTargetType: Schema.Literals<readonly ["memory", "kit", "agent_environment_policy", "decision", "task", "project_context", "context_relevance", "kit_source", "kit_version", "kit_installation", "kit_activation", "kit_trust_policy"]>;
11
+ export declare const ProposalRiskLevel: Schema.Literals<readonly ["low", "medium", "high"]>;
12
+ export declare const ProposalCheckKind: Schema.Literals<readonly ["schema", "policy", "preflight", "conflict", "safety"]>;
13
+ export declare const ProposalCheckStatus: Schema.Literals<readonly ["pending", "passed", "failed", "warning", "skipped"]>;
14
+ export declare const ProposalApplicationAction: Schema.Literals<readonly ["applied", "rejected", "reverted"]>;
15
+ export declare const ProposalSafeString: Schema.String;
16
+ export declare const ProposalSafeMetadata: Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>;
17
+ export declare const ProposalPayload: Schema.Struct<{
18
+ readonly memory: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>>;
19
+ readonly kit: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>>;
20
+ readonly kit_source: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>>;
21
+ readonly kit_version: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>>;
22
+ readonly kit_installation: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>>;
23
+ readonly kit_activation: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>>;
24
+ readonly kit_trust_policy: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>>;
25
+ readonly agent_environment_policy: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>>;
26
+ readonly decision: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>>;
27
+ readonly task: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>>;
28
+ readonly project_context: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>>;
29
+ readonly context_relevance: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>>;
30
+ }>;
31
+ export declare const ProposalTargetRef: Schema.Struct<{
32
+ readonly type: Schema.Literals<readonly ["memory", "kit", "agent_environment_policy", "decision", "task", "project_context", "context_relevance", "kit_source", "kit_version", "kit_installation", "kit_activation", "kit_trust_policy"]>;
33
+ readonly id: Schema.optionalKey<Schema.String>;
34
+ readonly scopeType: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"workspace">, Schema.Literal<"project">, Schema.Literal<"task">, Schema.Literal<"kit">]>>;
35
+ readonly scopeId: Schema.optionalKey<Schema.String>;
36
+ }>;
37
+ export declare const ProposalApprovalPolicy: Schema.Struct<{
38
+ readonly mode: Schema.Literals<readonly ["auto_approve_low_risk", "require_other_project_member", "require_workspace_owner_or_admin"]>;
39
+ readonly requireDifferentApprover: Schema.optionalKey<Schema.Boolean>;
40
+ readonly autonomousAgentApprovalAllowed: Schema.Literal<false>;
41
+ readonly deniedViolationCodes: Schema.$Array<Schema.Literals<readonly ["autonomous_self_approval", "self_capability_escalation", "missing_required_approval", "unsafe_payload", "target_conflict"]>>;
42
+ }>;
43
+ export declare const ProposalPolicyViolation: Schema.Struct<{
44
+ readonly code: Schema.Literals<readonly ["autonomous_self_approval", "self_capability_escalation", "missing_required_approval", "unsafe_payload", "target_conflict"]>;
45
+ readonly severity: Schema.Literals<readonly ["warning", "blocking"]>;
46
+ readonly message: Schema.String;
47
+ readonly actorId: Schema.optionalKey<Schema.String>;
48
+ readonly target: Schema.optionalKey<Schema.Struct<{
49
+ readonly type: Schema.Literals<readonly ["memory", "kit", "agent_environment_policy", "decision", "task", "project_context", "context_relevance", "kit_source", "kit_version", "kit_installation", "kit_activation", "kit_trust_policy"]>;
50
+ readonly id: Schema.optionalKey<Schema.String>;
51
+ readonly scopeType: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"workspace">, Schema.Literal<"project">, Schema.Literal<"task">, Schema.Literal<"kit">]>>;
52
+ readonly scopeId: Schema.optionalKey<Schema.String>;
53
+ }>>;
54
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>>;
55
+ }>;
56
+ export declare const ProposalRenderedDiff: Schema.Struct<{
57
+ readonly format: Schema.Literals<readonly ["summary", "field_diff", "markdown"]>;
58
+ readonly title: Schema.String;
59
+ readonly summary: Schema.String;
60
+ readonly sections: Schema.$Array<Schema.Struct<{
61
+ readonly title: Schema.String;
62
+ readonly beforeSummary: Schema.optionalKey<Schema.String>;
63
+ readonly afterSummary: Schema.optionalKey<Schema.String>;
64
+ readonly risk: Schema.Literals<readonly ["low", "medium", "high"]>;
65
+ }>>;
66
+ readonly refs: Schema.$Array<Schema.Struct<{
67
+ readonly kind: Schema.Literals<readonly ["memory", "kit", "loop", "agent", "agent_environment_policy", "decision", "task", "project_context", "context_relevance", "kit_source", "kit_version", "kit_installation", "kit_activation", "kit_trust_policy", "session", "step_attempt", "change_request"]>;
68
+ readonly id: Schema.optionalKey<Schema.String>;
69
+ readonly externalId: Schema.optionalKey<Schema.String>;
70
+ readonly url: Schema.optionalKey<Schema.String>;
71
+ readonly title: Schema.optionalKey<Schema.String>;
72
+ }>>;
73
+ }>;
74
+ export declare const ProposalRiskSummary: Schema.Struct<{
75
+ readonly level: Schema.Literals<readonly ["low", "medium", "high"]>;
76
+ readonly summary: Schema.String;
77
+ readonly reasons: Schema.$Array<Schema.String>;
78
+ }>;
79
+ export declare const KitMarketplaceProposalReview: Schema.Struct<{
80
+ readonly action: Schema.Literals<readonly ["source_publish", "version_publish", "source_update", "trust_change", "visibility_change", "broad_activation", "risky_agent_environment_effect", "rollback"]>;
81
+ readonly target: Schema.Struct<{
82
+ readonly type: Schema.Literals<readonly ["memory", "kit", "agent_environment_policy", "decision", "task", "project_context", "context_relevance", "kit_source", "kit_version", "kit_installation", "kit_activation", "kit_trust_policy"]>;
83
+ readonly id: Schema.optionalKey<Schema.String>;
84
+ readonly scopeType: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"workspace">, Schema.Literal<"project">, Schema.Literal<"task">, Schema.Literal<"kit">]>>;
85
+ readonly scopeId: Schema.optionalKey<Schema.String>;
86
+ }>;
87
+ readonly payload: Schema.Struct<{
88
+ readonly memory: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>>;
89
+ readonly kit: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>>;
90
+ readonly kit_source: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>>;
91
+ readonly kit_version: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>>;
92
+ readonly kit_installation: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>>;
93
+ readonly kit_activation: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>>;
94
+ readonly kit_trust_policy: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>>;
95
+ readonly agent_environment_policy: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>>;
96
+ readonly decision: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>>;
97
+ readonly task: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>>;
98
+ readonly project_context: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>>;
99
+ readonly context_relevance: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>>;
100
+ }>;
101
+ readonly renderedDiff: Schema.Struct<{
102
+ readonly format: Schema.Literals<readonly ["summary", "field_diff", "markdown"]>;
103
+ readonly title: Schema.String;
104
+ readonly summary: Schema.String;
105
+ readonly sections: Schema.$Array<Schema.Struct<{
106
+ readonly title: Schema.String;
107
+ readonly beforeSummary: Schema.optionalKey<Schema.String>;
108
+ readonly afterSummary: Schema.optionalKey<Schema.String>;
109
+ readonly risk: Schema.Literals<readonly ["low", "medium", "high"]>;
110
+ }>>;
111
+ readonly refs: Schema.$Array<Schema.Struct<{
112
+ readonly kind: Schema.Literals<readonly ["memory", "kit", "loop", "agent", "agent_environment_policy", "decision", "task", "project_context", "context_relevance", "kit_source", "kit_version", "kit_installation", "kit_activation", "kit_trust_policy", "session", "step_attempt", "change_request"]>;
113
+ readonly id: Schema.optionalKey<Schema.String>;
114
+ readonly externalId: Schema.optionalKey<Schema.String>;
115
+ readonly url: Schema.optionalKey<Schema.String>;
116
+ readonly title: Schema.optionalKey<Schema.String>;
117
+ }>>;
118
+ }>;
119
+ readonly riskSummary: Schema.Struct<{
120
+ readonly level: Schema.Literals<readonly ["low", "medium", "high"]>;
121
+ readonly summary: Schema.String;
122
+ readonly reasons: Schema.$Array<Schema.String>;
123
+ }>;
124
+ readonly validationFindings: Schema.$Array<Schema.Struct<{
125
+ readonly code: Schema.Literals<readonly ["autonomous_self_approval", "self_capability_escalation", "missing_required_approval", "unsafe_payload", "target_conflict"]>;
126
+ readonly severity: Schema.Literals<readonly ["warning", "blocking"]>;
127
+ readonly message: Schema.String;
128
+ readonly actorId: Schema.optionalKey<Schema.String>;
129
+ readonly target: Schema.optionalKey<Schema.Struct<{
130
+ readonly type: Schema.Literals<readonly ["memory", "kit", "agent_environment_policy", "decision", "task", "project_context", "context_relevance", "kit_source", "kit_version", "kit_installation", "kit_activation", "kit_trust_policy"]>;
131
+ readonly id: Schema.optionalKey<Schema.String>;
132
+ readonly scopeType: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"workspace">, Schema.Literal<"project">, Schema.Literal<"task">, Schema.Literal<"kit">]>>;
133
+ readonly scopeId: Schema.optionalKey<Schema.String>;
134
+ }>>;
135
+ readonly metadata: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>>;
136
+ }>>;
137
+ readonly approvalPolicy: Schema.Struct<{
138
+ readonly mode: Schema.Literals<readonly ["auto_approve_low_risk", "require_other_project_member", "require_workspace_owner_or_admin"]>;
139
+ readonly requireDifferentApprover: Schema.optionalKey<Schema.Boolean>;
140
+ readonly autonomousAgentApprovalAllowed: Schema.Literal<false>;
141
+ readonly deniedViolationCodes: Schema.$Array<Schema.Literals<readonly ["autonomous_self_approval", "self_capability_escalation", "missing_required_approval", "unsafe_payload", "target_conflict"]>>;
142
+ }>;
143
+ }>;
144
+ export declare const Proposal: Schema.Struct<{
145
+ readonly id: Schema.String;
146
+ readonly workspaceId: Schema.String;
147
+ readonly projectId: Schema.optionalKey<Schema.String>;
148
+ readonly taskId: Schema.optionalKey<Schema.String>;
149
+ readonly target: Schema.Struct<{
150
+ readonly type: Schema.Literals<readonly ["memory", "kit", "agent_environment_policy", "decision", "task", "project_context", "context_relevance", "kit_source", "kit_version", "kit_installation", "kit_activation", "kit_trust_policy"]>;
151
+ readonly id: Schema.optionalKey<Schema.String>;
152
+ readonly scopeType: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"workspace">, Schema.Literal<"project">, Schema.Literal<"task">, Schema.Literal<"kit">]>>;
153
+ readonly scopeId: Schema.optionalKey<Schema.String>;
154
+ }>;
155
+ readonly title: Schema.String;
156
+ readonly summary: Schema.String;
157
+ readonly status: Schema.Literals<readonly ["proposed", "in_review", "approved", "rejected", "applied", "reverted", "superseded", "canceled"]>;
158
+ readonly riskLevel: Schema.Literals<readonly ["low", "medium", "high"]>;
159
+ readonly approvalPolicy: Schema.Struct<{
160
+ readonly mode: Schema.Literals<readonly ["auto_approve_low_risk", "require_other_project_member", "require_workspace_owner_or_admin"]>;
161
+ readonly requireDifferentApprover: Schema.optionalKey<Schema.Boolean>;
162
+ readonly autonomousAgentApprovalAllowed: Schema.Literal<false>;
163
+ readonly deniedViolationCodes: Schema.$Array<Schema.Literals<readonly ["autonomous_self_approval", "self_capability_escalation", "missing_required_approval", "unsafe_payload", "target_conflict"]>>;
164
+ }>;
165
+ readonly proposedByActorType: Schema.Union<readonly [Schema.Literal<"human">, Schema.Literal<"delegated_agent">, Schema.Literal<"agent">]>;
166
+ readonly proposedByActorId: Schema.String;
167
+ readonly delegatedByUserId: Schema.optionalKey<Schema.String>;
168
+ readonly createdAt: Schema.String;
169
+ readonly updatedAt: Schema.String;
170
+ }>;
171
+ export declare const ProposalRevision: Schema.Struct<{
172
+ readonly id: Schema.String;
173
+ readonly proposalId: Schema.String;
174
+ readonly revisionNumber: Schema.Int;
175
+ readonly payload: Schema.Struct<{
176
+ readonly memory: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>>;
177
+ readonly kit: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>>;
178
+ readonly kit_source: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>>;
179
+ readonly kit_version: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>>;
180
+ readonly kit_installation: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>>;
181
+ readonly kit_activation: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>>;
182
+ readonly kit_trust_policy: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>>;
183
+ readonly agent_environment_policy: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>>;
184
+ readonly decision: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>>;
185
+ readonly task: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>>;
186
+ readonly project_context: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>>;
187
+ readonly context_relevance: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>>;
188
+ }>;
189
+ readonly renderedDiff: Schema.Struct<{
190
+ readonly format: Schema.Literals<readonly ["summary", "field_diff", "markdown"]>;
191
+ readonly title: Schema.String;
192
+ readonly summary: Schema.String;
193
+ readonly sections: Schema.$Array<Schema.Struct<{
194
+ readonly title: Schema.String;
195
+ readonly beforeSummary: Schema.optionalKey<Schema.String>;
196
+ readonly afterSummary: Schema.optionalKey<Schema.String>;
197
+ readonly risk: Schema.Literals<readonly ["low", "medium", "high"]>;
198
+ }>>;
199
+ readonly refs: Schema.$Array<Schema.Struct<{
200
+ readonly kind: Schema.Literals<readonly ["memory", "kit", "loop", "agent", "agent_environment_policy", "decision", "task", "project_context", "context_relevance", "kit_source", "kit_version", "kit_installation", "kit_activation", "kit_trust_policy", "session", "step_attempt", "change_request"]>;
201
+ readonly id: Schema.optionalKey<Schema.String>;
202
+ readonly externalId: Schema.optionalKey<Schema.String>;
203
+ readonly url: Schema.optionalKey<Schema.String>;
204
+ readonly title: Schema.optionalKey<Schema.String>;
205
+ }>>;
206
+ }>;
207
+ readonly riskSummary: Schema.Struct<{
208
+ readonly level: Schema.Literals<readonly ["low", "medium", "high"]>;
209
+ readonly summary: Schema.String;
210
+ readonly reasons: Schema.$Array<Schema.String>;
211
+ }>;
212
+ readonly createdByActorType: Schema.Union<readonly [Schema.Literal<"human">, Schema.Literal<"delegated_agent">, Schema.Literal<"agent">]>;
213
+ readonly createdByActorId: Schema.String;
214
+ readonly createdAt: Schema.String;
215
+ }>;
216
+ export declare const ProposalCommentAnchor: Schema.Struct<{
217
+ readonly path: Schema.$Array<Schema.String>;
218
+ readonly label: Schema.optionalKey<Schema.String>;
219
+ }>;
220
+ export declare const ProposalComment: Schema.Struct<{
221
+ readonly id: Schema.String;
222
+ readonly proposalId: Schema.String;
223
+ readonly revisionId: Schema.optionalKey<Schema.String>;
224
+ readonly body: Schema.String;
225
+ readonly anchor: Schema.optionalKey<Schema.Struct<{
226
+ readonly path: Schema.$Array<Schema.String>;
227
+ readonly label: Schema.optionalKey<Schema.String>;
228
+ }>>;
229
+ readonly actorType: Schema.Union<readonly [Schema.Literal<"human">, Schema.Literal<"delegated_agent">, Schema.Literal<"agent">]>;
230
+ readonly actorId: Schema.String;
231
+ readonly delegatedByUserId: Schema.optionalKey<Schema.String>;
232
+ readonly createdAt: Schema.String;
233
+ }>;
234
+ export declare const ProposalCheck: Schema.Struct<{
235
+ readonly id: Schema.String;
236
+ readonly proposalId: Schema.String;
237
+ readonly revisionId: Schema.optionalKey<Schema.String>;
238
+ readonly kind: Schema.Literals<readonly ["schema", "policy", "preflight", "conflict", "safety"]>;
239
+ readonly status: Schema.Literals<readonly ["pending", "passed", "failed", "warning", "skipped"]>;
240
+ readonly summary: Schema.String;
241
+ readonly details: Schema.optionalKey<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>, Schema.$Array<Schema.Union<readonly [Schema.String, Schema.Finite, Schema.Boolean, Schema.Null]>>]>>>;
242
+ readonly createdAt: Schema.String;
243
+ }>;
244
+ export declare const ProposalApplication: Schema.Struct<{
245
+ readonly id: Schema.String;
246
+ readonly proposalId: Schema.String;
247
+ readonly revisionId: Schema.String;
248
+ readonly action: Schema.Literals<readonly ["applied", "rejected", "reverted"]>;
249
+ readonly target: Schema.Struct<{
250
+ readonly type: Schema.Literals<readonly ["memory", "kit", "agent_environment_policy", "decision", "task", "project_context", "context_relevance", "kit_source", "kit_version", "kit_installation", "kit_activation", "kit_trust_policy"]>;
251
+ readonly id: Schema.optionalKey<Schema.String>;
252
+ readonly scopeType: Schema.optionalKey<Schema.Union<readonly [Schema.Literal<"workspace">, Schema.Literal<"project">, Schema.Literal<"task">, Schema.Literal<"kit">]>>;
253
+ readonly scopeId: Schema.optionalKey<Schema.String>;
254
+ }>;
255
+ readonly appliedByActorType: Schema.Union<readonly [Schema.Literal<"human">, Schema.Literal<"delegated_agent">, Schema.Literal<"agent">]>;
256
+ readonly appliedByActorId: Schema.String;
257
+ readonly targetVersionBefore: Schema.optionalKey<Schema.String>;
258
+ readonly targetVersionAfter: Schema.optionalKey<Schema.String>;
259
+ readonly rollbackRef: Schema.optionalKey<Schema.String>;
260
+ readonly appliedAt: Schema.String;
261
+ }>;
262
+ export declare function findForbiddenProposalPayloadPath<ValueType>(value: ValueType, path?: readonly string[]): readonly string[] | undefined;
263
+ export declare function isKitMarketplaceProposalTargetType(value: ProposalTargetType): value is (typeof KitMarketplaceProposalTargetTypes)[number];
264
+ export declare function validateKitMarketplaceProposalReview(input: {
265
+ readonly action: (typeof KitMarketplaceProposalActions)[number];
266
+ readonly target: ProposalTargetRef;
267
+ readonly payload: ProposalPayload;
268
+ readonly renderedDiff: ProposalRenderedDiff;
269
+ readonly riskSummary: ProposalRiskSummary;
270
+ readonly proposedByActorId?: string;
271
+ readonly approvingActorId?: string;
272
+ }): ProposalPolicyViolation[];
273
+ export type ProposalStatus = (typeof ProposalStatus)['Type'];
274
+ export type ProposalTargetType = (typeof ProposalTargetType)['Type'];
275
+ export type ProposalRiskLevel = (typeof ProposalRiskLevel)['Type'];
276
+ export type ProposalCheckKind = (typeof ProposalCheckKind)['Type'];
277
+ export type ProposalCheckStatus = (typeof ProposalCheckStatus)['Type'];
278
+ export type ProposalApplicationAction = (typeof ProposalApplicationAction)['Type'];
279
+ export type ProposalPayload = (typeof ProposalPayload)['Type'];
280
+ export type ProposalSafeMetadata = (typeof ProposalSafeMetadata)['Type'];
281
+ export type ProposalTargetRef = (typeof ProposalTargetRef)['Type'];
282
+ export type ProposalApprovalPolicy = (typeof ProposalApprovalPolicy)['Type'];
283
+ export type ProposalPolicyViolation = (typeof ProposalPolicyViolation)['Type'];
284
+ export type ProposalRenderedDiff = (typeof ProposalRenderedDiff)['Type'];
285
+ export type ProposalRiskSummary = (typeof ProposalRiskSummary)['Type'];
286
+ export type KitMarketplaceProposalReview = (typeof KitMarketplaceProposalReview)['Type'];
287
+ export type Proposal = (typeof Proposal)['Type'];
288
+ export type ProposalRevision = (typeof ProposalRevision)['Type'];
289
+ export type ProposalCommentAnchor = (typeof ProposalCommentAnchor)['Type'];
290
+ export type ProposalComment = (typeof ProposalComment)['Type'];
291
+ export type ProposalCheck = (typeof ProposalCheck)['Type'];
292
+ export type ProposalApplication = (typeof ProposalApplication)['Type'];
@@ -0,0 +1,2 @@
1
+ export declare const UnsafeProviderContentPattern: string;
2
+ export declare const SafeProviderMetadataPattern: string;
@@ -0,0 +1,73 @@
1
+ import * as Schema from 'effect/Schema';
2
+ import type { JsonValue } from './runtime-type';
3
+ declare const DurableSurfaceContractVersion: 'durable-redaction.v1';
4
+ export declare const RedactionClassifications: readonly ['secret', 'credential', 'pii', 'source', 'log', 'diff', 'transcript', 'provider_payload', 'url', 'path', 'unknown'];
5
+ type RedactionClassification = (typeof RedactionClassifications)[number];
6
+ declare const RedactionFindingSchema: Schema.Struct<{
7
+ readonly path: Schema.String;
8
+ readonly classification: Schema.Union<readonly [Schema.Literal<"secret">, Schema.Literal<"credential">, Schema.Literal<"pii">, Schema.Literal<"source">, Schema.Literal<"log">, Schema.Literal<"diff">, Schema.Literal<"transcript">, Schema.Literal<"provider_payload">, Schema.Literal<"url">, Schema.Literal<"path">, Schema.Literal<"unknown">]>;
9
+ readonly rule: Schema.String;
10
+ readonly preview: Schema.String;
11
+ readonly sha256: Schema.String;
12
+ }>;
13
+ export type RedactionFinding = (typeof RedactionFindingSchema)['Type'];
14
+ export declare const EvidenceRef: Schema.Struct<{
15
+ readonly contractVersion: Schema.Literal<"evidence-ref.v1">;
16
+ readonly kind: Schema.String;
17
+ readonly summary: Schema.String;
18
+ readonly sha256: Schema.String;
19
+ readonly redaction: Schema.Literal<"redacted">;
20
+ readonly findingCount: Schema.Int;
21
+ readonly classifications: Schema.$Array<Schema.Union<readonly [Schema.Literal<"secret">, Schema.Literal<"credential">, Schema.Literal<"pii">, Schema.Literal<"source">, Schema.Literal<"log">, Schema.Literal<"diff">, Schema.Literal<"transcript">, Schema.Literal<"provider_payload">, Schema.Literal<"url">, Schema.Literal<"path">, Schema.Literal<"unknown">]>>;
22
+ }>;
23
+ export type EvidenceRef = (typeof EvidenceRef)['Type'];
24
+ declare const RedactionSurfaceKinds: readonly ['api', 'mcp', 'cli', 'web', 'event', 'log', 'evidence', 'export'];
25
+ export declare const RedactionSurfaceKindSchema: Schema.Literals<readonly ["api", "mcp", "cli", "web", "event", "log", "evidence", "export"]>;
26
+ export type RedactionSurfaceKind = (typeof RedactionSurfaceKinds)[number];
27
+ export declare const RedactionWaiver: Schema.Struct<{
28
+ readonly contractVersion: Schema.Literal<"redaction-waiver.v1">;
29
+ readonly id: Schema.String;
30
+ readonly workspaceId: Schema.String;
31
+ readonly findingId: Schema.String;
32
+ readonly reason: Schema.String;
33
+ readonly authorityActorType: Schema.Union<readonly [Schema.Literal<"human">, Schema.Literal<"delegated_agent">, Schema.Literal<"agent">]>;
34
+ readonly authorityActorId: Schema.String;
35
+ readonly authorityRole: Schema.Union<readonly [Schema.Literal<"owner">, Schema.Literal<"admin">]>;
36
+ readonly expiresAt: Schema.optionalKey<Schema.String>;
37
+ readonly createdAt: Schema.String;
38
+ }>;
39
+ export type RedactionWaiver = (typeof RedactionWaiver)['Type'];
40
+ export declare function assertRedactionWaiverAuthority(role: string | undefined): asserts role is 'owner' | 'admin';
41
+ export type DurableSurfaceScan = {
42
+ readonly contractVersion: typeof DurableSurfaceContractVersion;
43
+ readonly clean: boolean;
44
+ readonly findings: readonly RedactionFinding[];
45
+ readonly unknownFindings: readonly RedactionFinding[];
46
+ };
47
+ type RedactedDurableSurface = {
48
+ readonly value: JsonValue;
49
+ readonly findings: readonly RedactionFinding[];
50
+ readonly scan: DurableSurfaceScan;
51
+ };
52
+ declare const DurableSurfaceScanError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
53
+ readonly _tag: "DurableSurfaceScanError";
54
+ } & Readonly<A>;
55
+ export declare class DurableSurfaceScanError extends DurableSurfaceScanError_base<{
56
+ readonly message: string;
57
+ readonly findings: readonly RedactionFinding[];
58
+ }> {
59
+ constructor(findings: readonly RedactionFinding[]);
60
+ }
61
+ export declare function classifyDurableSurfaceValue<ValueType>(key: string, value: ValueType, options?: DurableSurfaceScanOptions): RedactionClassification | undefined;
62
+ export type DurableSurfaceScanOptions = {
63
+ readonly allowCanonicalIds?: boolean;
64
+ /** Lets text cite plain https links, as an agent's Output does. */
65
+ readonly allowPlainUrls?: boolean;
66
+ };
67
+ export declare function scanDurableSurface<ValueType>(value: ValueType, path?: string, options?: DurableSurfaceScanOptions): DurableSurfaceScan;
68
+ export declare function assertDurableSurfaceClean<ValueType>(value: ValueType, path?: string): void;
69
+ export declare function redactDurableSurface<ValueType>(value: ValueType, path?: string): RedactedDurableSurface;
70
+ export declare function sha256Hex(input: string): string;
71
+ /** The last `maxChars` of command output, with secrets and credentials replaced; other content stays readable. */
72
+ export declare function redactedOutputTail(output: string, maxChars?: number): string;
73
+ export {};
@@ -0,0 +1,123 @@
1
+ import * as Schema from 'effect/Schema';
2
+ export declare const RepoBindingProviders: readonly ['github', 'gitlab', 'generic_git'];
3
+ export declare const RepoBindingCredentialProviderTypes: readonly ['env', 'file', 'exec'];
4
+ export declare const RepoBindingPathPrefixPattern = "^(?!/)(?!.*\\\\)(?!.*(?:^|/)\\.\\.?(?:/|$))(?!.*//)\\S+$";
5
+ export declare const RepoBindingProvider: Schema.Union<readonly [Schema.Literal<"github">, Schema.Literal<"gitlab">, Schema.Literal<"generic_git">]>;
6
+ export declare const RepoBindingCredentialProviderType: Schema.Union<readonly [Schema.Literal<"env">, Schema.Literal<"file">, Schema.Literal<"exec">]>;
7
+ export declare const RepoBindingCredentialRef: Schema.Union<readonly [Schema.Struct<{
8
+ readonly kind: Schema.Literal<"none">;
9
+ }>, Schema.Struct<{
10
+ readonly kind: Schema.Literal<"local_env">;
11
+ readonly envName: Schema.String;
12
+ }>, Schema.Struct<{
13
+ readonly kind: Schema.Literal<"runner_secret">;
14
+ readonly runnerSecretName: Schema.String;
15
+ readonly providerType: Schema.Union<readonly [Schema.Literal<"env">, Schema.Literal<"file">, Schema.Literal<"exec">]>;
16
+ }>, Schema.Struct<{
17
+ readonly kind: Schema.Literal<"ssh_agent">;
18
+ }>]>;
19
+ export declare const RepoBinding: Schema.Struct<{
20
+ readonly id: Schema.String;
21
+ readonly workspaceId: Schema.String;
22
+ readonly projectId: Schema.String;
23
+ readonly provider: Schema.Union<readonly [Schema.Literal<"github">, Schema.Literal<"gitlab">, Schema.Literal<"generic_git">]>;
24
+ readonly host: Schema.String;
25
+ readonly owner: Schema.String;
26
+ readonly name: Schema.String;
27
+ readonly repositoryUrl: Schema.optionalKey<Schema.String>;
28
+ readonly pathPrefix: Schema.optionalKey<Schema.String>;
29
+ readonly defaultTargetBranch: Schema.String;
30
+ readonly expectedBranch: Schema.optionalKey<Schema.String>;
31
+ readonly expectedCommitSha: Schema.optionalKey<Schema.String>;
32
+ readonly credentialRefs: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
33
+ readonly kind: Schema.Literal<"none">;
34
+ }>, Schema.Struct<{
35
+ readonly kind: Schema.Literal<"local_env">;
36
+ readonly envName: Schema.String;
37
+ }>, Schema.Struct<{
38
+ readonly kind: Schema.Literal<"runner_secret">;
39
+ readonly runnerSecretName: Schema.String;
40
+ readonly providerType: Schema.Union<readonly [Schema.Literal<"env">, Schema.Literal<"file">, Schema.Literal<"exec">]>;
41
+ }>, Schema.Struct<{
42
+ readonly kind: Schema.Literal<"ssh_agent">;
43
+ }>]>>;
44
+ readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>;
45
+ readonly createdAt: Schema.String;
46
+ readonly updatedAt: Schema.String;
47
+ }>;
48
+ export declare const RepoBindingCreate: Schema.Struct<{
49
+ readonly provider: Schema.Union<readonly [Schema.Literal<"github">, Schema.Literal<"gitlab">, Schema.Literal<"generic_git">]>;
50
+ readonly host: Schema.String;
51
+ readonly owner: Schema.String;
52
+ readonly name: Schema.String;
53
+ readonly repositoryUrl: Schema.optionalKey<Schema.String>;
54
+ readonly pathPrefix: Schema.optionalKey<Schema.String>;
55
+ readonly defaultTargetBranch: Schema.String;
56
+ readonly expectedBranch: Schema.optionalKey<Schema.String>;
57
+ readonly expectedCommitSha: Schema.optionalKey<Schema.String>;
58
+ readonly credentialRefs: Schema.optionalKey<Schema.$Array<Schema.Union<readonly [Schema.Struct<{
59
+ readonly kind: Schema.Literal<"none">;
60
+ }>, Schema.Struct<{
61
+ readonly kind: Schema.Literal<"local_env">;
62
+ readonly envName: Schema.String;
63
+ }>, Schema.Struct<{
64
+ readonly kind: Schema.Literal<"runner_secret">;
65
+ readonly runnerSecretName: Schema.String;
66
+ readonly providerType: Schema.Union<readonly [Schema.Literal<"env">, Schema.Literal<"file">, Schema.Literal<"exec">]>;
67
+ }>, Schema.Struct<{
68
+ readonly kind: Schema.Literal<"ssh_agent">;
69
+ }>]>>>;
70
+ }>;
71
+ export declare const RepoBindingTargetOverride: Schema.Struct<{
72
+ readonly targetBranch: Schema.optionalKey<Schema.String>;
73
+ }>;
74
+ export declare const RepoBindingList: Schema.Struct<{
75
+ readonly items: Schema.$Array<Schema.Struct<{
76
+ readonly id: Schema.String;
77
+ readonly workspaceId: Schema.String;
78
+ readonly projectId: Schema.String;
79
+ readonly provider: Schema.Union<readonly [Schema.Literal<"github">, Schema.Literal<"gitlab">, Schema.Literal<"generic_git">]>;
80
+ readonly host: Schema.String;
81
+ readonly owner: Schema.String;
82
+ readonly name: Schema.String;
83
+ readonly repositoryUrl: Schema.optionalKey<Schema.String>;
84
+ readonly pathPrefix: Schema.optionalKey<Schema.String>;
85
+ readonly defaultTargetBranch: Schema.String;
86
+ readonly expectedBranch: Schema.optionalKey<Schema.String>;
87
+ readonly expectedCommitSha: Schema.optionalKey<Schema.String>;
88
+ readonly credentialRefs: Schema.$Array<Schema.Union<readonly [Schema.Struct<{
89
+ readonly kind: Schema.Literal<"none">;
90
+ }>, Schema.Struct<{
91
+ readonly kind: Schema.Literal<"local_env">;
92
+ readonly envName: Schema.String;
93
+ }>, Schema.Struct<{
94
+ readonly kind: Schema.Literal<"runner_secret">;
95
+ readonly runnerSecretName: Schema.String;
96
+ readonly providerType: Schema.Union<readonly [Schema.Literal<"env">, Schema.Literal<"file">, Schema.Literal<"exec">]>;
97
+ }>, Schema.Struct<{
98
+ readonly kind: Schema.Literal<"ssh_agent">;
99
+ }>]>>;
100
+ readonly status: Schema.Union<readonly [Schema.Literal<"active">, Schema.Literal<"disabled">]>;
101
+ readonly createdAt: Schema.String;
102
+ readonly updatedAt: Schema.String;
103
+ }>>;
104
+ }>;
105
+ export declare const RunnerRepoBindingCapability: Schema.Struct<{
106
+ readonly repoBindingId: Schema.String;
107
+ readonly provider: Schema.Union<readonly [Schema.Literal<"github">, Schema.Literal<"gitlab">, Schema.Literal<"generic_git">]>;
108
+ readonly host: Schema.String;
109
+ readonly accessModes: Schema.$Array<Schema.Union<readonly [Schema.Literal<"local_checkout">, Schema.Literal<"managed_clone">, Schema.Literal<"runner_secret_provider">]>>;
110
+ readonly credentialProviderTypes: Schema.$Array<Schema.Union<readonly [Schema.Literal<"env">, Schema.Literal<"file">, Schema.Literal<"exec">]>>;
111
+ readonly authenticated: Schema.Boolean;
112
+ readonly canPush: Schema.optionalKey<Schema.Boolean>;
113
+ }>;
114
+ export type RepoBindingProvider = (typeof RepoBindingProvider)['Type'];
115
+ export type RepoBindingCredentialProviderType = (typeof RepoBindingCredentialProviderType)['Type'];
116
+ export type RepoBindingCredentialRef = (typeof RepoBindingCredentialRef)['Type'];
117
+ export type RepoBinding = (typeof RepoBinding)['Type'];
118
+ export type RepoBindingCreate = (typeof RepoBindingCreate)['Type'];
119
+ export type RepoBindingTargetOverride = (typeof RepoBindingTargetOverride)['Type'];
120
+ export type RepoBindingList = (typeof RepoBindingList)['Type'];
121
+ export type RunnerRepoBindingCapability = (typeof RunnerRepoBindingCapability)['Type'];
122
+ export declare function normalizeRepoBindingPathPrefix(value: string): string | undefined;
123
+ export declare function findForbiddenRepoBindingSecretPath<ValueType>(value: ValueType): string | undefined;
@@ -0,0 +1,28 @@
1
+ import * as Effect from 'effect/Effect';
2
+ import * as Exit from 'effect/Exit';
3
+ import * as Schema from 'effect/Schema';
4
+ /** The largest encoded journal entry Kitman stores; larger content belongs in a Run artifact. */
5
+ export declare const journalEntryMaxBytes: number;
6
+ export declare const encodeJournalExit: (exit: Exit.Exit<unknown, unknown>) => Effect.Effect<Schema.Json, Schema.SchemaError, never>;
7
+ export declare const decodeJournalExit: (input: unknown, options?: import("effect/SchemaAST").ParseOptions) => Effect.Effect<Exit.Exit<Schema.Json, Schema.Json>, Schema.SchemaError, never>;
8
+ /** How a deferred resolved by Kitman (an answer, a fired clock) is written to the journal. */
9
+ export declare const journalSuccess: (value: Schema.Json) => Schema.Json;
10
+ /** The SDK's Step failure as the journal holds it, for a Step Kitman fails on a program's behalf. */
11
+ export declare const JournalStepFailed: Schema.TaggedStruct<"StepFailed", {
12
+ readonly step: Schema.String;
13
+ readonly reason: Schema.String;
14
+ }>;
15
+ /** The SDK's Child Run failure as the journal holds it. */
16
+ export declare const JournalChildFailed: Schema.TaggedStruct<"ChildFailed", {
17
+ readonly step: Schema.String;
18
+ readonly loop: Schema.String;
19
+ readonly reason: Schema.String;
20
+ }>;
21
+ /** The SDK's `waitFor` timeout as the journal holds it. */
22
+ export declare const JournalWaitTimedOut: Schema.TaggedStruct<"WaitTimedOut", {
23
+ readonly step: Schema.String;
24
+ readonly event: Schema.String;
25
+ }>;
26
+ /** A deferred Kitman fails, with the deferred's error already encoded as JSON. */
27
+ export declare const journalFailure: (error: Schema.Json) => Schema.Json;
28
+ export declare const journalEntryBytes: (entry: Schema.Json) => number;
@@ -0,0 +1,67 @@
1
+ import type { JsonObject } from './runtime-type';
2
+ export type LaunchOutcome = 'feature' | 'bug' | 'refactor' | 'investigation' | 'docs' | 'migration';
3
+ /** Where and how a developer launched: their checkout, and the words they typed. */
4
+ export type LaunchContext = {
5
+ /** The Project the request names; it wins over the repository's. */
6
+ readonly projectId?: string;
7
+ readonly remoteUrl?: string;
8
+ /** A repository chosen outright, as the web's New run form does. */
9
+ readonly repoBindingId?: string;
10
+ readonly branch?: string;
11
+ readonly words?: string;
12
+ };
13
+ /** What the control plane knows that a launch may point at. */
14
+ export type LaunchCandidates = {
15
+ readonly repositories: readonly {
16
+ readonly repoBindingId: string;
17
+ readonly projectId: string;
18
+ readonly repositoryUrl: string;
19
+ }[];
20
+ /** Open ChangeRequests in those repositories. */
21
+ readonly changeRequests: readonly {
22
+ readonly id: string;
23
+ readonly repoBindingId: string;
24
+ readonly number?: number;
25
+ readonly sourceBranch?: string;
26
+ }[];
27
+ };
28
+ export type LaunchTask = {
29
+ readonly kind: 'tracker';
30
+ readonly key: string;
31
+ } | {
32
+ readonly kind: 'words';
33
+ readonly words: string;
34
+ };
35
+ export type InferredLaunch = {
36
+ readonly projectId?: string;
37
+ readonly repoBindingId?: string;
38
+ readonly branch?: string;
39
+ readonly changeRequestId?: string;
40
+ readonly trackerKeys: readonly string[];
41
+ readonly task?: LaunchTask;
42
+ readonly outcome?: LaunchOutcome;
43
+ /** Loop Input fields; `taskId` is left to whoever makes the Task. */
44
+ readonly input: JsonObject;
45
+ /** Required Loop Input fields nothing filled. */
46
+ readonly missing: readonly string[];
47
+ };
48
+ /** host/owner/name of a git remote, so SSH and HTTPS remotes of one repository match. */
49
+ export declare const repositoryKey: (url: string) => string;
50
+ /** A Loop Input JSON Schema's top-level fields, behind a `$ref` if it has one. */
51
+ export declare const launchInputSchema: (schema: JsonObject) => {
52
+ properties: JsonObject;
53
+ required: any[];
54
+ };
55
+ /**
56
+ * What a launch means: the Project, repository, branch, open ChangeRequest, Task and Outcome its context points at,
57
+ * and the Loop Input they fill. The words fill a `words` field, or else the one required text field left.
58
+ */
59
+ export declare const inferLaunch: (launch: {
60
+ readonly context: LaunchContext;
61
+ readonly loop: {
62
+ readonly input: JsonObject;
63
+ readonly outcome?: LaunchOutcome;
64
+ };
65
+ readonly candidates: LaunchCandidates;
66
+ readonly given?: JsonObject;
67
+ }) => InferredLaunch;