@cleocode/contracts 2026.9.20 → 2026.9.22
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.
- package/README.md +1 -1
- package/dist/__tests__/decide.test.d.ts +7 -0
- package/dist/__tests__/decide.test.d.ts.map +1 -0
- package/dist/__tests__/decide.test.js +91 -0
- package/dist/__tests__/decide.test.js.map +1 -0
- package/dist/__tests__/evidence-atom-schema.test.js +19 -1
- package/dist/__tests__/evidence-atom-schema.test.js.map +1 -1
- package/dist/__tests__/memory-wire-shapes.test.js.map +1 -1
- package/dist/acceptance-gate-schema.d.ts +5 -0
- package/dist/acceptance-gate-schema.d.ts.map +1 -1
- package/dist/acceptance-gate-schema.js +26 -0
- package/dist/acceptance-gate-schema.js.map +1 -1
- package/dist/acceptance-gate.d.ts +70 -3
- package/dist/acceptance-gate.d.ts.map +1 -1
- package/dist/backup-manifest.d.ts +13 -2
- package/dist/backup-manifest.d.ts.map +1 -1
- package/dist/branch-lock.d.ts +11 -0
- package/dist/branch-lock.d.ts.map +1 -1
- package/dist/branch-lock.js +31 -4
- package/dist/branch-lock.js.map +1 -1
- package/dist/cloud/api.d.ts +607 -0
- package/dist/cloud/api.d.ts.map +1 -0
- package/dist/cloud/api.js +417 -0
- package/dist/cloud/api.js.map +1 -0
- package/dist/cloud/envelope.d.ts +84 -0
- package/dist/cloud/envelope.d.ts.map +1 -0
- package/dist/cloud/envelope.js +54 -0
- package/dist/cloud/envelope.js.map +1 -0
- package/dist/cloud/ids.d.ts +30 -0
- package/dist/cloud/ids.d.ts.map +1 -0
- package/dist/cloud/ids.js +32 -0
- package/dist/cloud/ids.js.map +1 -0
- package/dist/cloud/index.d.ts +17 -0
- package/dist/cloud/index.d.ts.map +1 -0
- package/dist/cloud/index.js +17 -0
- package/dist/cloud/index.js.map +1 -0
- package/dist/data-accessor.d.ts +23 -3
- package/dist/data-accessor.d.ts.map +1 -1
- package/dist/data-accessor.js.map +1 -1
- package/dist/decide.d.ts +333 -0
- package/dist/decide.d.ts.map +1 -0
- package/dist/decide.js +184 -0
- package/dist/decide.js.map +1 -0
- package/dist/dispatch/operations-registry.d.ts.map +1 -1
- package/dist/dispatch/operations-registry.js +56 -0
- package/dist/dispatch/operations-registry.js.map +1 -1
- package/dist/done-plan.d.ts +330 -0
- package/dist/done-plan.d.ts.map +1 -0
- package/dist/done-plan.js +17 -0
- package/dist/done-plan.js.map +1 -0
- package/dist/evidence-atom-schema.d.ts +29 -44
- package/dist/evidence-atom-schema.d.ts.map +1 -1
- package/dist/evidence-atom-schema.js +48 -8
- package/dist/evidence-atom-schema.js.map +1 -1
- package/dist/exit-codes.d.ts +40 -0
- package/dist/exit-codes.d.ts.map +1 -1
- package/dist/exit-codes.js +41 -0
- package/dist/exit-codes.js.map +1 -1
- package/dist/graph.d.ts +40 -0
- package/dist/graph.d.ts.map +1 -1
- package/dist/index.d.ts +13 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/memory/observe.d.ts +16 -0
- package/dist/memory/observe.d.ts.map +1 -1
- package/dist/operations/__tests__/release-shared-surface.test.d.ts +10 -0
- package/dist/operations/__tests__/release-shared-surface.test.d.ts.map +1 -0
- package/dist/operations/__tests__/release-shared-surface.test.js +84 -0
- package/dist/operations/__tests__/release-shared-surface.test.js.map +1 -0
- package/dist/operations/dialectic.d.ts +16 -0
- package/dist/operations/dialectic.d.ts.map +1 -1
- package/dist/operations/docs.d.ts +5 -2
- package/dist/operations/docs.d.ts.map +1 -1
- package/dist/operations/docs.js.map +1 -1
- package/dist/operations/memory.d.ts +48 -0
- package/dist/operations/memory.d.ts.map +1 -1
- package/dist/operations/nexus-scope-map.d.ts +8 -0
- package/dist/operations/nexus-scope-map.d.ts.map +1 -1
- package/dist/operations/nexus-scope-map.js +8 -0
- package/dist/operations/nexus-scope-map.js.map +1 -1
- package/dist/operations/nexus-user-profile.d.ts +27 -1
- package/dist/operations/nexus-user-profile.d.ts.map +1 -1
- package/dist/operations/nexus-user-profile.js +11 -1
- package/dist/operations/nexus-user-profile.js.map +1 -1
- package/dist/operations/nexus.d.ts +394 -3
- package/dist/operations/nexus.d.ts.map +1 -1
- package/dist/operations/release.d.ts +259 -0
- package/dist/operations/release.d.ts.map +1 -1
- package/dist/operations/release.js +130 -1
- package/dist/operations/release.js.map +1 -1
- package/dist/operations/session.d.ts +6 -4
- package/dist/operations/session.d.ts.map +1 -1
- package/dist/operations/tasks.d.ts +6 -0
- package/dist/operations/tasks.d.ts.map +1 -1
- package/dist/operations/tasks.js +1 -0
- package/dist/operations/tasks.js.map +1 -1
- package/dist/operations/validate.d.ts +5 -0
- package/dist/operations/validate.d.ts.map +1 -1
- package/dist/operations/worktree.d.ts +125 -1
- package/dist/operations/worktree.d.ts.map +1 -1
- package/dist/process-probe.d.ts +17 -0
- package/dist/process-probe.d.ts.map +1 -0
- package/dist/process-probe.js +21 -0
- package/dist/process-probe.js.map +1 -0
- package/dist/project-context.d.ts +44 -2
- package/dist/project-context.d.ts.map +1 -1
- package/dist/project-lifecycle.d.ts +143 -0
- package/dist/project-lifecycle.d.ts.map +1 -0
- package/dist/project-lifecycle.js +21 -0
- package/dist/project-lifecycle.js.map +1 -0
- package/dist/release/plan.d.ts +6 -2
- package/dist/release/plan.d.ts.map +1 -1
- package/dist/release/plan.js +8 -2
- package/dist/release/plan.js.map +1 -1
- package/dist/release/plan.test.js +6 -1
- package/dist/release/plan.test.js.map +1 -1
- package/dist/table-classification.d.ts +208 -0
- package/dist/table-classification.d.ts.map +1 -0
- package/dist/table-classification.js +23 -0
- package/dist/table-classification.js.map +1 -0
- package/dist/task.d.ts +97 -1
- package/dist/task.d.ts.map +1 -1
- package/package.json +6 -2
- package/schemas/gate-result.schema.json +43 -0
- package/src/__tests__/__snapshots__/operations-registry.test.ts.snap +1 -1
- package/src/__tests__/decide.test.ts +139 -0
- package/src/__tests__/evidence-atom-schema.test.ts +24 -1
- package/src/__tests__/memory-wire-shapes.test.ts +3 -0
- package/src/acceptance-gate-schema.ts +29 -0
- package/src/acceptance-gate.ts +68 -3
- package/src/backup-manifest.ts +13 -2
- package/src/branch-lock.ts +36 -4
- package/src/cloud/api.ts +512 -0
- package/src/cloud/envelope.ts +63 -0
- package/src/cloud/ids.ts +51 -0
- package/src/cloud/index.ts +16 -0
- package/src/data-accessor.ts +24 -3
- package/src/decide.ts +355 -0
- package/src/dispatch/operations-registry.ts +59 -0
- package/src/done-plan.ts +370 -0
- package/src/evidence-atom-schema.ts +51 -9
- package/src/exit-codes.ts +42 -0
- package/src/graph.ts +44 -0
- package/src/index.ts +118 -0
- package/src/memory/observe.ts +16 -0
- package/src/operations/__tests__/release-shared-surface.test.ts +112 -0
- package/src/operations/dialectic.ts +17 -0
- package/src/operations/docs.ts +5 -2
- package/src/operations/memory.ts +48 -0
- package/src/operations/nexus-scope-map.ts +9 -0
- package/src/operations/nexus-user-profile.ts +29 -1
- package/src/operations/nexus.ts +416 -3
- package/src/operations/release.ts +197 -0
- package/src/operations/session.ts +6 -4
- package/src/operations/tasks.ts +7 -0
- package/src/operations/validate.ts +5 -0
- package/src/operations/worktree.ts +133 -1
- package/src/process-probe.ts +21 -0
- package/src/project-context.ts +42 -2
- package/src/project-lifecycle.ts +149 -0
- package/src/release/plan.test.ts +6 -1
- package/src/release/plan.ts +8 -2
- package/src/table-classification.ts +232 -0
- package/src/task.ts +102 -2
package/dist/decide.js
ADDED
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed-decision contracts — provider-neutral domain types and zod schemas.
|
|
3
|
+
*
|
|
4
|
+
* A *typed decision* asks a decision model a set of named questions about a
|
|
5
|
+
* piece of state and receives, for every question, a calibrated probability
|
|
6
|
+
* distribution over the admissible answers plus a confidence score. Three
|
|
7
|
+
* question shapes exist:
|
|
8
|
+
*
|
|
9
|
+
* - `noul` — a yes/no question; the answer is a probability that it holds.
|
|
10
|
+
* - `choice` — pick one of several named options.
|
|
11
|
+
* - `score` — place the state on an ordered scale of 2–10 levels.
|
|
12
|
+
*
|
|
13
|
+
* These types describe the DOMAIN, not any one vendor's wire format. Provider
|
|
14
|
+
* adapters (in `packages/core/`) translate between these shapes and their
|
|
15
|
+
* transport; nothing here names a provider.
|
|
16
|
+
*
|
|
17
|
+
* This file is types + zod schemas + const data only (arch gate 10,
|
|
18
|
+
* `scripts/lint-no-runtime-in-contracts.mjs`). Validation entry points are the
|
|
19
|
+
* exported `*Schema` values; call `.parse()` / `.safeParse()` on them.
|
|
20
|
+
*
|
|
21
|
+
* @task T12489
|
|
22
|
+
* @epic T12486
|
|
23
|
+
*/
|
|
24
|
+
import { z } from 'zod';
|
|
25
|
+
// ─── Const data ───────────────────────────────────────────────────────────────
|
|
26
|
+
/** Every supported decision-question shape, in canonical order. */
|
|
27
|
+
export const DECISION_QUESTION_TYPES = ['noul', 'choice', 'score'];
|
|
28
|
+
/**
|
|
29
|
+
* Where a {@link DecisionOutcome} came from.
|
|
30
|
+
*
|
|
31
|
+
* - `provider` — answered live by a decision provider.
|
|
32
|
+
* - `cache` — replayed from a previously stored provider answer.
|
|
33
|
+
* - `fallback` — produced locally because no provider answer was available.
|
|
34
|
+
*/
|
|
35
|
+
export const DECISION_OUTCOME_SOURCES = ['provider', 'cache', 'fallback'];
|
|
36
|
+
/**
|
|
37
|
+
* Hard limits a {@link DecisionRequest} must respect. Enforced by
|
|
38
|
+
* {@link decisionRequestSchema}.
|
|
39
|
+
*/
|
|
40
|
+
export const DECISION_REQUEST_LIMITS = {
|
|
41
|
+
/**
|
|
42
|
+
* Maximum size of `state`, in UTF-16 characters. A string state is measured
|
|
43
|
+
* directly; a structured (object/array) state is measured on its
|
|
44
|
+
* `JSON.stringify` serialization, which is what goes over the wire.
|
|
45
|
+
*/
|
|
46
|
+
maxStateChars: 32_000,
|
|
47
|
+
/** Minimum number of questions in one request. */
|
|
48
|
+
minQuestions: 1,
|
|
49
|
+
/** Maximum number of questions in one request. */
|
|
50
|
+
maxQuestions: 32,
|
|
51
|
+
/** Minimum number of options a `choice` question must offer. */
|
|
52
|
+
minChoiceOptions: 2,
|
|
53
|
+
/** Minimum number of levels on a `score` question's scale. */
|
|
54
|
+
minScoreLevels: 2,
|
|
55
|
+
/** Maximum number of levels on a `score` question's scale. */
|
|
56
|
+
maxScoreLevels: 10,
|
|
57
|
+
};
|
|
58
|
+
// ─── Zod schemas ──────────────────────────────────────────────────────────────
|
|
59
|
+
/** Zod schema for {@link DecisionQuestionType}. */
|
|
60
|
+
export const decisionQuestionTypeSchema = z.enum(DECISION_QUESTION_TYPES);
|
|
61
|
+
/** Zod schema for {@link DecisionOutcomeSource}. */
|
|
62
|
+
export const decisionOutcomeSourceSchema = z.enum(DECISION_OUTCOME_SOURCES);
|
|
63
|
+
/** Zod schema for {@link DecisionInstructions}. */
|
|
64
|
+
export const decisionInstructionsSchema = z.union([z.string(), z.record(z.string(), z.json())]);
|
|
65
|
+
/** A probability or confidence: a finite number in [0, 1]. */
|
|
66
|
+
const unitIntervalSchema = z.number().min(0).max(1);
|
|
67
|
+
/**
|
|
68
|
+
* Zod schema for {@link DecisionState}. Rejects a state whose size exceeds
|
|
69
|
+
* {@link DECISION_REQUEST_LIMITS.maxStateChars} (serialized size for
|
|
70
|
+
* structured state).
|
|
71
|
+
*/
|
|
72
|
+
export const decisionStateSchema = z
|
|
73
|
+
.union([z.string(), z.array(z.json()), z.record(z.string(), z.json())])
|
|
74
|
+
.superRefine((state, context) => {
|
|
75
|
+
const size = typeof state === 'string' ? state.length : JSON.stringify(state).length;
|
|
76
|
+
if (size > DECISION_REQUEST_LIMITS.maxStateChars) {
|
|
77
|
+
context.addIssue({
|
|
78
|
+
code: 'custom',
|
|
79
|
+
message: `state is ${size} characters; the limit is ${DECISION_REQUEST_LIMITS.maxStateChars}`,
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
/** Zod schema for {@link NoulDecisionQuestion}. */
|
|
84
|
+
export const noulDecisionQuestionSchema = z.object({
|
|
85
|
+
type: z.literal('noul'),
|
|
86
|
+
instructions: decisionInstructionsSchema.optional(),
|
|
87
|
+
criteria: z.string().min(1),
|
|
88
|
+
});
|
|
89
|
+
/** Zod schema for {@link ChoiceDecisionQuestion}; requires at least two options. */
|
|
90
|
+
export const choiceDecisionQuestionSchema = z.object({
|
|
91
|
+
type: z.literal('choice'),
|
|
92
|
+
instructions: decisionInstructionsSchema.optional(),
|
|
93
|
+
criteria: z
|
|
94
|
+
.record(z.string().min(1), z.string())
|
|
95
|
+
.refine((options) => Object.keys(options).length >= DECISION_REQUEST_LIMITS.minChoiceOptions, {
|
|
96
|
+
message: `a choice question needs at least ${DECISION_REQUEST_LIMITS.minChoiceOptions} options`,
|
|
97
|
+
}),
|
|
98
|
+
});
|
|
99
|
+
/** Zod schema for {@link ScoreDecisionQuestion}; requires 2–10 levels. */
|
|
100
|
+
export const scoreDecisionQuestionSchema = z.object({
|
|
101
|
+
type: z.literal('score'),
|
|
102
|
+
instructions: decisionInstructionsSchema.optional(),
|
|
103
|
+
criteria: z
|
|
104
|
+
.array(z.string())
|
|
105
|
+
.min(DECISION_REQUEST_LIMITS.minScoreLevels)
|
|
106
|
+
.max(DECISION_REQUEST_LIMITS.maxScoreLevels),
|
|
107
|
+
});
|
|
108
|
+
/** Zod discriminated-union schema for {@link DecisionQuestion}. */
|
|
109
|
+
export const decisionQuestionSchema = z.discriminatedUnion('type', [
|
|
110
|
+
noulDecisionQuestionSchema,
|
|
111
|
+
choiceDecisionQuestionSchema,
|
|
112
|
+
scoreDecisionQuestionSchema,
|
|
113
|
+
]);
|
|
114
|
+
/**
|
|
115
|
+
* Zod schema for {@link DecisionRequest}. Enforces every
|
|
116
|
+
* {@link DECISION_REQUEST_LIMITS} bound: state size, 1–32 questions, ≥ 2
|
|
117
|
+
* choice options and 2–10 score levels.
|
|
118
|
+
*
|
|
119
|
+
* @example
|
|
120
|
+
* ```ts
|
|
121
|
+
* decisionRequestSchema.parse({
|
|
122
|
+
* state: 'The build failed on a flaky network test.',
|
|
123
|
+
* questions: {
|
|
124
|
+
* retry: { type: 'noul', criteria: 'Retrying is likely to succeed' },
|
|
125
|
+
* severity: { type: 'score', criteria: ['trivial', 'minor', 'major'] },
|
|
126
|
+
* },
|
|
127
|
+
* });
|
|
128
|
+
* ```
|
|
129
|
+
*/
|
|
130
|
+
export const decisionRequestSchema = z.object({
|
|
131
|
+
model: z.string().min(1).optional(),
|
|
132
|
+
state: decisionStateSchema,
|
|
133
|
+
questions: z.record(z.string().min(1), decisionQuestionSchema).refine((questions) => {
|
|
134
|
+
const count = Object.keys(questions).length;
|
|
135
|
+
return (count >= DECISION_REQUEST_LIMITS.minQuestions &&
|
|
136
|
+
count <= DECISION_REQUEST_LIMITS.maxQuestions);
|
|
137
|
+
}, {
|
|
138
|
+
message: `a request needs ${DECISION_REQUEST_LIMITS.minQuestions}–${DECISION_REQUEST_LIMITS.maxQuestions} questions`,
|
|
139
|
+
}),
|
|
140
|
+
});
|
|
141
|
+
/** Zod schema for {@link NoulDecisionAnswer}. */
|
|
142
|
+
export const noulDecisionAnswerSchema = z.object({
|
|
143
|
+
type: z.literal('noul'),
|
|
144
|
+
value: z.boolean(),
|
|
145
|
+
probability: unitIntervalSchema,
|
|
146
|
+
confidence: unitIntervalSchema,
|
|
147
|
+
});
|
|
148
|
+
/** Zod schema for {@link ChoiceDecisionAnswer}. */
|
|
149
|
+
export const choiceDecisionAnswerSchema = z.object({
|
|
150
|
+
type: z.literal('choice'),
|
|
151
|
+
value: z.string().min(1),
|
|
152
|
+
probabilities: z.record(z.string().min(1), unitIntervalSchema),
|
|
153
|
+
confidence: unitIntervalSchema,
|
|
154
|
+
});
|
|
155
|
+
/** Zod schema for {@link ScoreDecisionAnswer}. */
|
|
156
|
+
export const scoreDecisionAnswerSchema = z.object({
|
|
157
|
+
type: z.literal('score'),
|
|
158
|
+
value: z.number().int().nonnegative(),
|
|
159
|
+
probabilities: z
|
|
160
|
+
.array(unitIntervalSchema)
|
|
161
|
+
.min(DECISION_REQUEST_LIMITS.minScoreLevels)
|
|
162
|
+
.max(DECISION_REQUEST_LIMITS.maxScoreLevels),
|
|
163
|
+
confidence: unitIntervalSchema,
|
|
164
|
+
});
|
|
165
|
+
/** Zod discriminated-union schema for {@link DecisionAnswer}. */
|
|
166
|
+
export const decisionAnswerSchema = z.discriminatedUnion('type', [
|
|
167
|
+
noulDecisionAnswerSchema,
|
|
168
|
+
choiceDecisionAnswerSchema,
|
|
169
|
+
scoreDecisionAnswerSchema,
|
|
170
|
+
]);
|
|
171
|
+
/** Zod schema for {@link DecisionOutcome} (e.g. when reading a cached outcome back). */
|
|
172
|
+
export const decisionOutcomeSchema = z.object({
|
|
173
|
+
answers: z.record(z.string().min(1), decisionAnswerSchema),
|
|
174
|
+
source: decisionOutcomeSourceSchema,
|
|
175
|
+
requestId: z.string().min(1).optional(),
|
|
176
|
+
latencyMs: z.number().nonnegative(),
|
|
177
|
+
costUsd: z.number().nonnegative().optional(),
|
|
178
|
+
inputTokens: z.number().int().nonnegative().optional(),
|
|
179
|
+
});
|
|
180
|
+
/** Zod schema for {@link DecisionProviderConfig}; `baseUrl` must be an absolute URL. */
|
|
181
|
+
export const decisionProviderConfigSchema = z.object({
|
|
182
|
+
baseUrl: z.url(),
|
|
183
|
+
});
|
|
184
|
+
//# sourceMappingURL=decide.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"decide.js","sourceRoot":"","sources":["../src/decide.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,iFAAiF;AAEjF,mEAAmE;AACnE,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAU,CAAC;AAE5E;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,UAAU,EAAE,OAAO,EAAE,UAAU,C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AAoB,CAAC;IAC1D,MAAM,EAAE,2BAA2B;IACnC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE;IACvC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,WAAW,EAAE;IACnC,OAAO,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE;IAC5C,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE;CACvD,CAAC,CAAC;AAEH,wFAAwF;AACxF,MAAM,CAAC,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IACnD,OAAO,EAAE,CAAC,CAAC,GAAG,EAAE;CACjB,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"operations-registry.d.ts","sourceRoot":"","sources":["../../src/dispatch/operations-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,OAAO,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAEjG,YAAY,EAAE,eAAe,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAMvE;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,YAAY,GAAG,YAAY,CAExD;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,eAAe,EAAE,GAAG,EAAE,YAAY,EAAE,GAAG,YAAY,EAAE,CAE1F;AAeD,6DAA6D;AAC7D,eAAO,MAAM,UAAU,EAAE,YAAY,
|
|
1
|
+
{"version":3,"file":"operations-registry.d.ts","sourceRoot":"","sources":["../../src/dispatch/operations-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,OAAO,KAAK,EAAE,eAAe,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAEjG,YAAY,EAAE,eAAe,EAAE,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;AAMvE;;;;;;;GAOG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,YAAY,GAAG,YAAY,CAExD;AAED;;;;;;;GAOG;AACH,wBAAgB,YAAY,CAAC,OAAO,EAAE,eAAe,EAAE,GAAG,EAAE,YAAY,EAAE,GAAG,YAAY,EAAE,CAE1F;AAeD,6DAA6D;AAC7D,eAAO,MAAM,UAAU,EAAE,YAAY,EAk7UpC,CAAC"}
|
|
@@ -2967,6 +2967,13 @@ export const OPERATIONS = [
|
|
|
2967
2967
|
description: 'Disable automatic parent completion',
|
|
2968
2968
|
cli: { flag: 'no-auto-complete' },
|
|
2969
2969
|
},
|
|
2970
|
+
{
|
|
2971
|
+
name: 'expectedUpdatedAt',
|
|
2972
|
+
type: 'string',
|
|
2973
|
+
required: false,
|
|
2974
|
+
description: 'Optimistic-concurrency guard: fail with E_CONFLICT unless the task updatedAt still equals this value',
|
|
2975
|
+
cli: { flag: 'expected-updated-at' },
|
|
2976
|
+
},
|
|
2970
2977
|
],
|
|
2971
2978
|
inputSchema: tasksUpdateInputContract,
|
|
2972
2979
|
outputSchema: OUTPUT_CONTRACTS['tasks.update'],
|
|
@@ -6750,6 +6757,42 @@ export const OPERATIONS = [
|
|
|
6750
6757
|
},
|
|
6751
6758
|
],
|
|
6752
6759
|
},
|
|
6760
|
+
{
|
|
6761
|
+
gateway: 'mutate',
|
|
6762
|
+
domain: 'nexus',
|
|
6763
|
+
operation: 'projects.status',
|
|
6764
|
+
description: 'nexus.projects.status (mutate) — probe and record git state of every project location on this device (bounded, parallel; no network unless fetch)',
|
|
6765
|
+
tier: 1,
|
|
6766
|
+
idempotent: true,
|
|
6767
|
+
sessionRequired: false,
|
|
6768
|
+
requiredParams: [],
|
|
6769
|
+
params: [
|
|
6770
|
+
{
|
|
6771
|
+
name: 'fetch',
|
|
6772
|
+
type: 'boolean',
|
|
6773
|
+
required: false,
|
|
6774
|
+
description: 'Run git fetch per location first (network; off by default)',
|
|
6775
|
+
},
|
|
6776
|
+
{
|
|
6777
|
+
name: 'concurrency',
|
|
6778
|
+
type: 'number',
|
|
6779
|
+
required: false,
|
|
6780
|
+
description: 'Locations probed at once (default 8, max 64)',
|
|
6781
|
+
},
|
|
6782
|
+
{
|
|
6783
|
+
name: 'timeoutMs',
|
|
6784
|
+
type: 'number',
|
|
6785
|
+
required: false,
|
|
6786
|
+
description: 'Per-location git budget in ms (default 10000; 30000 with fetch)',
|
|
6787
|
+
},
|
|
6788
|
+
{
|
|
6789
|
+
name: 'staleAfterMs',
|
|
6790
|
+
type: 'number',
|
|
6791
|
+
required: false,
|
|
6792
|
+
description: 'A fetch older than this marks remote state stale (default 24h)',
|
|
6793
|
+
},
|
|
6794
|
+
],
|
|
6795
|
+
},
|
|
6753
6796
|
{
|
|
6754
6797
|
gateway: 'mutate',
|
|
6755
6798
|
domain: 'nexus',
|
|
@@ -7926,6 +7969,12 @@ export const OPERATIONS = [
|
|
|
7926
7969
|
{ name: 'title', type: 'string', required: false, description: 'Override PR title' },
|
|
7927
7970
|
{ name: 'body', type: 'string', required: false, description: 'Override PR body' },
|
|
7928
7971
|
{ name: 'base', type: 'string', required: false, description: 'PR base branch' },
|
|
7972
|
+
{
|
|
7973
|
+
name: 'taskId',
|
|
7974
|
+
type: 'string',
|
|
7975
|
+
required: false,
|
|
7976
|
+
description: 'Owning task id (T####) for the PR commit subject',
|
|
7977
|
+
},
|
|
7929
7978
|
],
|
|
7930
7979
|
},
|
|
7931
7980
|
{
|
|
@@ -7959,6 +8008,12 @@ export const OPERATIONS = [
|
|
|
7959
8008
|
{ name: 'title', type: 'string', required: false, description: 'Override PR title' },
|
|
7960
8009
|
{ name: 'body', type: 'string', required: false, description: 'Override PR body' },
|
|
7961
8010
|
{ name: 'base', type: 'string', required: false, description: 'PR base branch' },
|
|
8011
|
+
{
|
|
8012
|
+
name: 'taskId',
|
|
8013
|
+
type: 'string',
|
|
8014
|
+
required: false,
|
|
8015
|
+
description: 'Owning task id (T####) for the PR commit subject',
|
|
8016
|
+
},
|
|
7962
8017
|
],
|
|
7963
8018
|
},
|
|
7964
8019
|
{
|
|
@@ -8168,6 +8223,7 @@ export const OPERATIONS = [
|
|
|
8168
8223
|
required: false,
|
|
8169
8224
|
enum: DOCS_LIFECYCLE_STATUSES,
|
|
8170
8225
|
description: 'Override the new lifecycle status. Defaults to "draft" on every update. ' +
|
|
8226
|
+
'Alone (no file or content) it changes only the lifecycle status. ' +
|
|
8171
8227
|
`Valid: ${DOCS_LIFECYCLE_STATUSES.join('|')}.`,
|
|
8172
8228
|
},
|
|
8173
8229
|
{
|