@skrr-ai/cli 0.1.126 → 0.1.128
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/dist/base-command.d.ts +23 -0
- package/dist/base-command.js +72 -0
- package/dist/commands/agents/chat.js +7 -0
- package/dist/commands/agents/goals/list.d.ts +2 -2
- package/dist/commands/agents/goals/list.js +2 -2
- package/dist/commands/commitments/action-history.js +1 -1
- package/dist/commands/commitments/cases.js +3 -3
- package/dist/commands/commitments/check-now.d.ts +10 -2
- package/dist/commands/commitments/check-now.js +53 -3
- package/dist/commands/commitments/create.d.ts +6 -14
- package/dist/commands/commitments/create.js +61 -6
- package/dist/commands/commitments/doctor.js +3 -1
- package/dist/commands/commitments/effective-policy.d.ts +11 -1
- package/dist/commands/commitments/effective-policy.js +84 -4
- package/dist/commands/commitments/hypotheses.js +12 -12
- package/dist/commands/commitments/next-tick.js +5 -0
- package/dist/commands/commitments/observations.js +18 -17
- package/dist/commands/commitments/pack/list.js +2 -1
- package/dist/commands/commitments/pack/plan.d.ts +6 -0
- package/dist/commands/commitments/pack/plan.js +19 -0
- package/dist/commands/commitments/preflight.d.ts +19 -0
- package/dist/commands/commitments/preflight.js +108 -10
- package/dist/commands/commitments/trigger-status.js +8 -0
- package/dist/commands/commitments/update.d.ts +1 -0
- package/dist/commands/commitments/update.js +45 -4
- package/dist/commands/commitments/wake-capabilities.js +13 -0
- package/dist/commands/compass/archive.js +4 -0
- package/dist/commands/compass/commitments.js +15 -1
- package/dist/commands/compass/create.js +11 -3
- package/dist/commands/compass/effective-policy.d.ts +1 -0
- package/dist/commands/compass/effective-policy.js +8 -7
- package/dist/commands/compass/revert.d.ts +8 -0
- package/dist/commands/compass/revert.js +25 -1
- package/dist/commands/compass/revisions.d.ts +2 -0
- package/dist/commands/compass/revisions.js +18 -2
- package/dist/commands/compass/tactic.d.ts +5 -3
- package/dist/commands/compass/tactic.js +8 -7
- package/dist/commands/compass/update.js +19 -3
- package/dist/commands/followups/act.js +1 -1
- package/dist/commands/followups/cancel.js +13 -0
- package/dist/commands/followups/observability.js +20 -1
- package/dist/commands/followups/plans/create.js +12 -1
- package/dist/commands/followups/show.js +13 -0
- package/dist/commands/followups/watch.js +1 -1
- package/dist/commands/goals/create.d.ts +1 -0
- package/dist/commands/goals/create.js +4 -1
- package/dist/commands/goals/planner-config.d.ts +11 -0
- package/dist/commands/goals/planner-config.js +16 -0
- package/dist/commands/goals/revisions.js +3 -19
- package/dist/commands/machines/update.d.ts +5 -3
- package/dist/commands/machines/update.js +70 -9
- package/dist/commands/northstars/create.js +3 -1
- package/dist/commands/northstars/governance/configure.d.ts +4 -0
- package/dist/commands/northstars/governance/configure.js +75 -9
- package/dist/commands/northstars/intents/decide.d.ts +6 -0
- package/dist/commands/northstars/intents/decide.js +69 -15
- package/dist/commands/northstars/intents/list.d.ts +2 -1
- package/dist/commands/northstars/intents/list.js +15 -5
- package/dist/commands/northstars/intents.d.ts +26 -0
- package/dist/commands/northstars/intents.js +49 -0
- package/dist/commands/northstars/list.d.ts +1 -0
- package/dist/commands/northstars/list.js +24 -3
- package/dist/commands/northstars/recommendations/list.d.ts +1 -1
- package/dist/commands/northstars/recommendations/list.js +3 -3
- package/dist/commands/northstars/recommendations.d.ts +19 -0
- package/dist/commands/northstars/recommendations.js +42 -0
- package/dist/commands/northstars/review-now.d.ts +1 -0
- package/dist/commands/northstars/review-now.js +10 -4
- package/dist/commands/northstars/reviews.d.ts +1 -0
- package/dist/commands/northstars/reviews.js +19 -3
- package/dist/commands/northstars/update.js +8 -1
- package/dist/commands/proposals/list.js +11 -2
- package/dist/commands/proposals/show.js +9 -1
- package/dist/commands/spaces/auto-executor/preview.d.ts +14 -1
- package/dist/commands/spaces/auto-executor/preview.js +35 -1
- package/dist/commands/spaces/auto-executor/run.d.ts +17 -0
- package/dist/commands/spaces/auto-executor/run.js +60 -2
- package/dist/commands/spaces/files/upload.js +1 -2
- package/dist/commands/spaces/index.js +23 -0
- package/dist/commands/spaces/revisions.js +3 -2
- package/dist/commands/tasks/revisions.js +3 -2
- package/dist/commands/triggers/fire-detail.js +2 -0
- package/dist/generated/agent-guides.json +69 -69
- package/dist/lib/agentic-stream.d.ts +9 -0
- package/dist/lib/agentic-stream.js +14 -0
- package/dist/lib/command-miss.js +11 -2
- package/dist/lib/commitment-attention-copy.d.ts +96 -0
- package/dist/lib/commitment-attention-copy.js +209 -0
- package/dist/lib/commitment-loop-status.d.ts +6 -0
- package/dist/lib/commitment-loop-status.js +16 -6
- package/dist/lib/commitments.d.ts +88 -0
- package/dist/lib/commitments.js +188 -0
- package/dist/lib/compass-body-help.d.ts +20 -0
- package/dist/lib/compass-body-help.js +61 -0
- package/dist/lib/compass-refusals.d.ts +35 -0
- package/dist/lib/compass-refusals.js +50 -0
- package/dist/lib/compasses.d.ts +80 -4
- package/dist/lib/compasses.js +232 -12
- package/dist/lib/followups.d.ts +22 -1
- package/dist/lib/followups.js +21 -1
- package/dist/lib/format.d.ts +11 -0
- package/dist/lib/format.js +29 -0
- package/dist/lib/initiatives.d.ts +9 -2
- package/dist/lib/initiatives.js +13 -2
- package/dist/lib/machines.d.ts +14 -1
- package/dist/lib/machines.js +24 -0
- package/dist/lib/northstars.d.ts +158 -24
- package/dist/lib/northstars.js +538 -26
- package/dist/lib/proposal-decision-command.js +21 -1
- package/dist/lib/proposals.d.ts +26 -1
- package/dist/lib/proposals.js +163 -0
- package/dist/lib/rate-limit-retry.d.ts +5 -0
- package/dist/lib/rate-limit-retry.js +19 -0
- package/dist/lib/revision-actor.d.ts +2 -0
- package/dist/lib/revision-actor.js +16 -0
- package/dist/lib/roles.d.ts +1 -1
- package/dist/lib/space-charter.js +9 -0
- package/dist/lib/task-asset-upload.js +1 -2
- package/dist/lib/triggers.d.ts +33 -1
- package/dist/lib/triggers.js +77 -3
- package/dist/node_modules/@skrr-ai/data-provider/index.js +7537 -7474
- package/oclif.manifest.json +357 -34
- package/package.json +4 -4
package/dist/lib/northstars.d.ts
CHANGED
|
@@ -1,25 +1,3 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* northstars.ts — request-based client for the Northstar portfolio layer
|
|
3
|
-
* (`/api/northstars/*`) and its Portfolio Governor.
|
|
4
|
-
*
|
|
5
|
-
* A **Northstar** groups and prioritizes many Commitments without owning their
|
|
6
|
-
* loop. The **Governor** is a MODE of its periodic review, not a separate
|
|
7
|
-
* entity: a review rolls portfolio health up, allocates each Commitment a
|
|
8
|
-
* cadence band and run budget, and emits TYPED management intents that a single
|
|
9
|
-
* router turns into `CommitmentControl` mutations — advisory, awaiting a human,
|
|
10
|
-
* or (narrowly) automatic.
|
|
11
|
-
*
|
|
12
|
-
* Two dials, deliberately separate:
|
|
13
|
-
* - `analysisMode` — does an Agent get to think about this portfolio?
|
|
14
|
-
* - `executionMode` — how much write authority does the outcome carry?
|
|
15
|
-
*
|
|
16
|
-
* Both default to the safe end (`deterministic` / `advisory`), which is exactly
|
|
17
|
-
* what a Northstar did before the Governor existed.
|
|
18
|
-
*
|
|
19
|
-
* Every vocabulary below is RE-EXPORTED from `@skrr-ai/data-provider`, never
|
|
20
|
-
* re-declared. The API validates against those exact strings; a second copy here
|
|
21
|
-
* is how the CLI silently drifts from the server that rejects it.
|
|
22
|
-
*/
|
|
23
1
|
import { NORTHSTAR_ANALYSIS_MODES, NORTHSTAR_APPROVAL_TRIGGERS, NORTHSTAR_EXECUTION_MODES, NORTHSTAR_INTENT_VERDICTS, NORTHSTAR_MANAGEMENT_INTENT_KINDS, NORTHSTAR_REVIEW_STATUSES } from '@skrr-ai/data-provider';
|
|
24
2
|
import type { Northstar, NorthstarAnalysisMode, NorthstarExecutionMode, NorthstarGovernance, NorthstarGovernanceStatus, NorthstarGovernanceUpdateParams, NorthstarListResponse, NorthstarManagementIntent, NorthstarManagementIntentKind, NorthstarRecommendation, NorthstarReviewRecord, NorthstarStatusResponse } from '@skrr-ai/data-provider';
|
|
25
3
|
import { withQuery } from './triggers';
|
|
@@ -33,6 +11,16 @@ export type { Northstar, NorthstarAnalysisMode, NorthstarExecutionMode, Northsta
|
|
|
33
11
|
export declare const NORTHSTAR_STATUSES: readonly ["active", "paused", "achieved", "archived"];
|
|
34
12
|
export declare const NORTHSTAR_PRIORITY_TIERS: readonly ["critical", "high", "medium", "low"];
|
|
35
13
|
export declare const NORTHSTAR_RECOMMENDATION_STATUSES: readonly ["open", "applied", "dismissed"];
|
|
14
|
+
/**
|
|
15
|
+
* What a configure that changed the allocation inputs (the run budget, the critical reserve, the
|
|
16
|
+
* cadence band) says it did to the linked commitments. Additive on the server: absent from an
|
|
17
|
+
* older server, `allocationsPending` only when non-zero, `allocationsRefreshFailed` only on failure.
|
|
18
|
+
*/
|
|
19
|
+
export type AllocationRefreshFields = {
|
|
20
|
+
allocationsRefreshed?: number;
|
|
21
|
+
allocationsPending?: number;
|
|
22
|
+
allocationsRefreshFailed?: boolean;
|
|
23
|
+
};
|
|
36
24
|
export declare const northstarApi: {
|
|
37
25
|
list: (query?: Parameters<typeof withQuery>[1]) => Promise<NorthstarListResponse>;
|
|
38
26
|
create: (body: Record<string, unknown>) => Promise<Northstar>;
|
|
@@ -51,23 +39,169 @@ export declare const northstarApi: {
|
|
|
51
39
|
northstarId: string;
|
|
52
40
|
northstarVersion: number;
|
|
53
41
|
governance: NorthstarGovernance;
|
|
54
|
-
}>;
|
|
42
|
+
} & AllocationRefreshFields>;
|
|
55
43
|
reviews: (id: string, query?: Parameters<typeof withQuery>[1]) => Promise<{
|
|
56
44
|
data: NorthstarReviewRecord[];
|
|
45
|
+
has_more?: boolean;
|
|
57
46
|
}>;
|
|
58
47
|
review: (id: string, reviewId: string) => Promise<NorthstarReviewRecord>;
|
|
59
48
|
reviewNow: (id: string) => Promise<Record<string, unknown>>;
|
|
60
49
|
intents: (id: string, query?: Parameters<typeof withQuery>[1]) => Promise<{
|
|
61
50
|
data: NorthstarManagementIntent[];
|
|
51
|
+
has_more?: boolean;
|
|
62
52
|
}>;
|
|
63
53
|
decideIntent: (id: string, intentId: string, body: Record<string, unknown>) => Promise<Record<string, unknown>>;
|
|
64
54
|
};
|
|
65
55
|
/** ms → a short human duration, for a table cell that must stay narrow. */
|
|
66
56
|
export declare function humanMs(ms?: number): string;
|
|
67
57
|
export declare function shortDate(value?: string): string;
|
|
58
|
+
export declare const NORTHSTAR_REASON_WORDS: Readonly<Record<string, string>>;
|
|
59
|
+
/** A code in words; an unknown code comes back unchanged, an absent one says so. */
|
|
60
|
+
export declare function describeNorthstarReason(code: string | null | undefined): string;
|
|
61
|
+
export type NorthstarDecisionContext = {
|
|
62
|
+
northstarId: string;
|
|
63
|
+
intentId: string;
|
|
64
|
+
decision: 'approve' | 'reject';
|
|
65
|
+
/** The CLI binary name, for the command a sentence tells the reader to run. */
|
|
66
|
+
bin?: string;
|
|
67
|
+
};
|
|
68
|
+
/**
|
|
69
|
+
* A refused decision, as one sentence with its next step.
|
|
70
|
+
*
|
|
71
|
+
* `body` is the server's refusal (`reason`, plus the context it adds: the two
|
|
72
|
+
* northstar versions, or when and by whom the intent was already decided).
|
|
73
|
+
*/
|
|
74
|
+
export declare function describeDecisionRefusal(body: Record<string, unknown>, ctx: NorthstarDecisionContext): {
|
|
75
|
+
code: string;
|
|
76
|
+
text: string;
|
|
77
|
+
};
|
|
78
|
+
export type NorthstarDecisionOutcome = {
|
|
79
|
+
/** The arrow line (`nsi_x → applied`), printed before any explanation. */
|
|
80
|
+
headline: string;
|
|
81
|
+
/** 0 only when the thing asked for now holds. */
|
|
82
|
+
exitCode: 0 | 1;
|
|
83
|
+
/** What to say after the headline. */
|
|
84
|
+
text?: string;
|
|
85
|
+
/** The raw code behind a non-zero exit, for `--json` and `Code:`. */
|
|
86
|
+
code?: string;
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* What a decision that the server ACCEPTED (HTTP 200) actually did.
|
|
90
|
+
*
|
|
91
|
+
* One exit rule: an approval exits 0 only when the intent is `applied`, and a
|
|
92
|
+
* rejection only when it is `rejected`. An approval the version fence
|
|
93
|
+
* invalidated, or one whose change has not landed, used to print a line shaped
|
|
94
|
+
* like success and exit 0, so a script could not tell it from one that worked.
|
|
95
|
+
*/
|
|
96
|
+
export declare function describeDecisionOutcome(result: Record<string, unknown>, ctx: NorthstarDecisionContext): NorthstarDecisionOutcome;
|
|
97
|
+
/** What the server returned before `--limit` existed; sent explicitly so a page is never silently smaller. */
|
|
98
|
+
export declare const NORTHSTAR_LIST_DEFAULT_LIMIT = 50;
|
|
99
|
+
/**
|
|
100
|
+
* The footer under a list that was cut short. `has_more: false` used to be
|
|
101
|
+
* unconditional on these lists, so a page of `--limit` rows read as the whole
|
|
102
|
+
* answer; the server now says when there is more and this says what to do.
|
|
103
|
+
* Empty when the page is complete.
|
|
104
|
+
*
|
|
105
|
+
* `cursor` is true only for a list that can be paged (`northstars list`); the
|
|
106
|
+
* reviews and intents lists have no cursor, so their way on is a larger
|
|
107
|
+
* `--limit`, or a narrower `--status` once `--limit` is at its ceiling.
|
|
108
|
+
*/
|
|
109
|
+
export declare function listFooter(input: {
|
|
110
|
+
shown: number;
|
|
111
|
+
hasMore: boolean;
|
|
112
|
+
limit: number;
|
|
113
|
+
max: number;
|
|
114
|
+
nextCursor?: string | null;
|
|
115
|
+
cursor?: boolean;
|
|
116
|
+
}): string;
|
|
68
117
|
export declare function renderNorthstarList(rows: Northstar[], log: (line: string) => void): void;
|
|
118
|
+
/**
|
|
119
|
+
* The active-commitment cap, in words. `0` is accepted and stored, and a review
|
|
120
|
+
* treats it as "no cap" (it does not flag every commitment over a cap of zero),
|
|
121
|
+
* so the screen says that rather than letting `0` read as a limit.
|
|
122
|
+
*/
|
|
123
|
+
export declare function describeMaxActive(value: number | undefined): string;
|
|
69
124
|
export declare function renderNorthstar(status: NorthstarStatusResponse, log: (line: string) => void): void;
|
|
70
125
|
export declare function renderRecommendationList(rows: NorthstarRecommendation[], log: (line: string) => void): void;
|
|
126
|
+
/**
|
|
127
|
+
* No reviewer configured, a ready one, and an unreachable one are three
|
|
128
|
+
* different answers — and the third is the one an operator needs spelled out,
|
|
129
|
+
* because a scheduled review trigger says nothing about whether the agent that
|
|
130
|
+
* would run it is online.
|
|
131
|
+
*/
|
|
132
|
+
export declare function reviewerReadiness(reviewer: NorthstarGovernanceStatus['reviewer']): string;
|
|
133
|
+
/** The `governance configure` flags that move what a commitment's allocation is computed from. */
|
|
134
|
+
export declare const ALLOCATION_INPUT_FLAGS: readonly ["max-runs-per-day", "clear-max-runs-per-day", "critical-reserve", "min-interval-hours", "max-interval-hours", "max-relative-change"];
|
|
135
|
+
export type AllocationRefresh = {
|
|
136
|
+
refreshed: number;
|
|
137
|
+
pending: number;
|
|
138
|
+
failed: boolean;
|
|
139
|
+
};
|
|
140
|
+
/** The refresh summary a configure response carries, or undefined from a server that sends none. */
|
|
141
|
+
export declare function readAllocationRefresh(response: AllocationRefreshFields | undefined): AllocationRefresh | undefined;
|
|
142
|
+
/**
|
|
143
|
+
* What `governance configure` says about the linked commitments. The server re-applies a changed
|
|
144
|
+
* budget or cadence band to every linked active commitment at once and answers how many it wrote,
|
|
145
|
+
* how many it could not, and whether the refresh itself failed; the command discarded all of it and
|
|
146
|
+
* re-read the status, so "nothing happened" and "applied to three" looked the same (OSK-21245).
|
|
147
|
+
*
|
|
148
|
+
* `inputsSent` is whether this call touched an allocation input: only then is "already up to date" a
|
|
149
|
+
* true statement, since a zero is also what an unrelated change (the analysis mode) answers.
|
|
150
|
+
*/
|
|
151
|
+
export declare function describeAllocationRefresh(refresh: AllocationRefresh | undefined, options: {
|
|
152
|
+
northstarId: string;
|
|
153
|
+
inputsSent: boolean;
|
|
154
|
+
bin?: string;
|
|
155
|
+
}): {
|
|
156
|
+
lines: string[];
|
|
157
|
+
warnings: string[];
|
|
158
|
+
};
|
|
159
|
+
/**
|
|
160
|
+
* The `Allocations` line of `review-now`. The count is of commitments WRITTEN, so `0` does not say
|
|
161
|
+
* "nothing happened": it is what a review prints when a configure already applied the budget, or
|
|
162
|
+
* when no active commitment is linked, or when no review row could be opened to write under.
|
|
163
|
+
*/
|
|
164
|
+
export declare function describeReviewAllocations(result: {
|
|
165
|
+
review?: unknown;
|
|
166
|
+
allocations?: unknown;
|
|
167
|
+
attention?: unknown;
|
|
168
|
+
}): string;
|
|
71
169
|
export declare function renderGovernance(status: NorthstarGovernanceStatus, log: (line: string) => void): void;
|
|
170
|
+
/**
|
|
171
|
+
* The automatic-change budget line.
|
|
172
|
+
*
|
|
173
|
+
* `0/day` is a MODE (automatic changes off, everything waits for approval), and `used` can
|
|
174
|
+
* legitimately exceed any cap, because the changes were made before the owner lowered it. A bare
|
|
175
|
+
* `2/0 used today · 0 left` collapses both into a ratio over 100% that says neither (OSK-21233).
|
|
176
|
+
*/
|
|
177
|
+
export declare function describeAutoBudget(budget: NorthstarGovernanceStatus['mutationBudget']): string;
|
|
178
|
+
/** One cell of words for what a review did beyond "it ran"; empty when there is nothing to add. */
|
|
179
|
+
export declare function reviewNote(review: NorthstarReviewRecord): string;
|
|
180
|
+
/** `Reason` line of one review: the words, with the raw code kept beside them for grep. */
|
|
181
|
+
export declare function describeReviewReason(reason: string): string;
|
|
72
182
|
export declare function renderReviewList(reviews: NorthstarReviewRecord[], log: (line: string) => void): void;
|
|
73
|
-
|
|
183
|
+
/** `--wide` on every command that prints the intents table. */
|
|
184
|
+
export declare const northstarWideFlag: import("@oclif/core/interfaces").BooleanFlag<boolean>;
|
|
185
|
+
export type IntentTableOptions = {
|
|
186
|
+
/** Never clip the reason, and keep the machine code beside it as `[code]`. */
|
|
187
|
+
wide?: boolean;
|
|
188
|
+
/** Terminal width to fit the table to; defaults to the real terminal, else 250. */
|
|
189
|
+
columns?: number;
|
|
190
|
+
};
|
|
191
|
+
/**
|
|
192
|
+
* The intents table.
|
|
193
|
+
*
|
|
194
|
+
* WHY is the HUMAN reason the governor wrote (`reason`), not the machine code in
|
|
195
|
+
* `verdictReason`, which says why an intent needed approval (`execution_mode_approval`)
|
|
196
|
+
* and is no reason for the change itself. The code stays in `--json`, and beside
|
|
197
|
+
* the sentence as `[code]` under `--wide`. By default the sentence is cut at a
|
|
198
|
+
* word boundary to what the terminal leaves after the other columns.
|
|
199
|
+
*/
|
|
200
|
+
export declare function renderIntentList(intents: NorthstarManagementIntent[], log: (line: string) => void, options?: IntentTableOptions): void;
|
|
201
|
+
/**
|
|
202
|
+
* The line that says a review's intent budget cut something off. A cap of 0
|
|
203
|
+
* records nothing at all, which a screen reading "No management intents." made
|
|
204
|
+
* indistinguishable from a review with nothing to say; the count was only in
|
|
205
|
+
* `--json` (`deterministicSnapshot.truncatedIntents`).
|
|
206
|
+
*/
|
|
207
|
+
export declare function intentBudgetNote(truncated: unknown, cap?: unknown): string;
|