@skrr-ai/cli 0.1.104 → 0.1.106
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.js +6 -2
- package/dist/commands/agenda/trigger/list.js +2 -0
- package/dist/commands/agents/chat.js +4 -1
- package/dist/commands/agents/operating-plan.js +5 -2
- package/dist/commands/agents/triggers/create.js +3 -1
- package/dist/commands/agents/triggers/fire.js +2 -0
- package/dist/commands/agents/triggers/replay.js +2 -0
- package/dist/commands/agents/triggers/update.js +12 -4
- package/dist/commands/commitments/action-history.js +7 -2
- package/dist/commands/commitments/cadence-decisions.js +6 -1
- package/dist/commands/commitments/cadence-requests/decide.d.ts +1 -1
- package/dist/commands/commitments/cadence-requests/decide.js +1 -1
- package/dist/commands/commitments/doctor.js +7 -1
- package/dist/commands/commitments/observations.js +7 -1
- package/dist/commands/commitments/operating-review.d.ts +15 -0
- package/dist/commands/commitments/operating-review.js +23 -2
- package/dist/commands/commitments/preflight.d.ts +12 -0
- package/dist/commands/commitments/preflight.js +23 -9
- package/dist/commands/commitments/reflection.js +6 -1
- package/dist/commands/commitments/show.js +3 -1
- package/dist/commands/commitments/trigger-status.js +2 -22
- package/dist/commands/commitments/wake-capabilities.d.ts +13 -0
- package/dist/commands/commitments/wake-capabilities.js +39 -3
- package/dist/commands/daemon/logs.d.ts +73 -3
- package/dist/commands/daemon/logs.js +304 -17
- package/dist/commands/followups/act.js +13 -1
- package/dist/commands/followups/checkin.js +11 -2
- package/dist/commands/followups/reschedule.js +13 -1
- package/dist/commands/proposals/discard.d.ts +1 -1
- package/dist/commands/proposals/keep.d.ts +1 -1
- package/dist/commands/proposals/list.d.ts +7 -0
- package/dist/commands/proposals/list.js +31 -5
- package/dist/commands/proposals/show.d.ts +2 -1
- package/dist/commands/proposals/show.js +31 -4
- package/dist/commands/proposals/snooze.d.ts +1 -1
- package/dist/commands/requests/create.js +8 -3
- package/dist/commands/spaces/workflows/create.js +3 -3
- package/dist/commands/tasks/complete.js +4 -0
- package/dist/commands/tasks/create.d.ts +2 -0
- package/dist/commands/tasks/create.js +17 -3
- package/dist/commands/tasks/deliverable/add.d.ts +2 -0
- package/dist/commands/tasks/deliverable/add.js +22 -7
- package/dist/commands/tasks/deliverable/list.d.ts +13 -0
- package/dist/commands/tasks/deliverable/list.js +34 -1
- package/dist/commands/tasks/economics-compare.js +7 -1
- package/dist/commands/tasks/expectations.d.ts +10 -0
- package/dist/commands/tasks/expectations.js +31 -3
- package/dist/commands/tasks/list.d.ts +9 -0
- package/dist/commands/tasks/list.js +40 -5
- package/dist/commands/tasks/report.js +1 -1
- package/dist/commands/tasks/result/show.d.ts +7 -0
- package/dist/commands/tasks/result/show.js +32 -1
- package/dist/commands/tasks/result/submit.js +1 -1
- package/dist/commands/tasks/retry-schedule.js +11 -1
- package/dist/commands/tasks/show.d.ts +6 -0
- package/dist/commands/tasks/show.js +23 -0
- package/dist/commands/tasks/update.d.ts +3 -0
- package/dist/commands/tasks/update.js +23 -3
- package/dist/commands/triggers/audit.js +6 -2
- package/dist/commands/triggers/create.js +3 -1
- package/dist/commands/triggers/fire.d.ts +1 -0
- package/dist/commands/triggers/fire.js +16 -1
- package/dist/commands/triggers/preflight.js +6 -5
- package/dist/commands/triggers/replay.js +2 -0
- package/dist/commands/triggers/update.js +12 -4
- package/dist/commands/workspaces/stewardship.js +5 -1
- package/dist/lib/agentic-stream.d.ts +9 -0
- package/dist/lib/agentic-stream.js +38 -18
- package/dist/lib/commitment-event-wakes.d.ts +8 -0
- package/dist/lib/commitment-event-wakes.js +39 -0
- package/dist/lib/commitment-ledgers.d.ts +9 -0
- package/dist/lib/commitment-ledgers.js +126 -0
- package/dist/lib/commitments.d.ts +102 -2
- package/dist/lib/commitments.js +208 -8
- package/dist/lib/delegated-cli.js +13 -2
- package/dist/lib/followups.d.ts +6 -0
- package/dist/lib/followups.js +12 -0
- package/dist/lib/message-content.d.ts +6 -0
- package/dist/lib/message-content.js +24 -0
- package/dist/lib/operating-plan-loops.d.ts +8 -0
- package/dist/lib/operating-plan-loops.js +32 -0
- package/dist/lib/preflight-copy.d.ts +27 -0
- package/dist/lib/preflight-copy.js +89 -0
- package/dist/lib/proposal-decision-command.d.ts +1 -1
- package/dist/lib/proposal-decision-command.js +27 -3
- package/dist/lib/proposals.d.ts +17 -0
- package/dist/lib/proposals.js +41 -0
- package/dist/lib/stewardship-output.js +57 -12
- package/dist/lib/task-economics-line.d.ts +30 -0
- package/dist/lib/task-economics-line.js +49 -0
- package/dist/lib/task-economics.d.ts +15 -0
- package/dist/lib/task-economics.js +73 -8
- package/dist/lib/task-recurrence-outcome.d.ts +19 -0
- package/dist/lib/task-recurrence-outcome.js +30 -0
- package/dist/lib/triggers.d.ts +42 -0
- package/dist/lib/triggers.js +136 -2
- package/dist/lib/widgetTerminalText.d.ts +8 -0
- package/dist/lib/widgetTerminalText.js +116 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/cliHandoffWire.d.ts +33 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/cliHandoffWire.js +27 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/telemetryRedaction.d.ts +28 -5
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/telemetryRedaction.js +50 -5
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/cliHandoffWire.d.ts +33 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/cliHandoffWire.js +26 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/telemetryRedaction.d.ts +28 -5
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/telemetryRedaction.js +50 -5
- package/dist/node_modules/@skrr-ai/auth-core/package.json +1 -1
- package/dist/node_modules/@skrr-ai/data-provider/index.js +7261 -7056
- package/docs/v1/operations.md +1 -1
- package/oclif.manifest.json +116 -72
- package/package.json +1 -1
|
@@ -16,10 +16,30 @@
|
|
|
16
16
|
* and `api/server/services/HostedPreview/__tests__/telemetryRedaction.spec.js` against tokens the issuer really
|
|
17
17
|
* mints, so a change to either side fails there rather than in a trace nobody reads.
|
|
18
18
|
*
|
|
19
|
+
* THE OTHER PATH CREDENTIALS (OSK-16174). Four more bearer credentials travel in a URL, and until they were added here
|
|
20
|
+
* only the request logger's path rewrite (`requestLogger.js`) knew them, so the same address that was scrubbed from a
|
|
21
|
+
* log line reached a trace and an error report in full: a workspace invitation (`wsi_`), a platform invitation
|
|
22
|
+
* (`pinv_`), a member's invitation link (`usr_`) and an operator's (`adm2_`, and the older `adm_`). Unlike `pvw_`, whose
|
|
23
|
+
* prefix is rare enough to match on its own, `usr_` and `adm_` begin ordinary words and identifiers (`/usr_local`,
|
|
24
|
+
* `adm_users`), so each of these is recognised by the SHAPE its minting code gives it, and a lookalike is left alone:
|
|
25
|
+
*
|
|
26
|
+
* wsi_ / pinv_ / usr_ / adm2_ `<prefix>_<32 hex>.<version>.<key id>.<43 base64url>`, from `buildCredential` in
|
|
27
|
+
* `api/models/WorkspaceInvite.js` and `PlatformInvitation.js` and `buildUserCode` and
|
|
28
|
+
* `buildAdminCode` in `InvitationCode.js`. The older member link, `usr_<32 hex>.<24
|
|
29
|
+
* base64url>`, has the same first two fields. Matched from the prefix to the end of the
|
|
30
|
+
* token's characters once the 32-hex id and its dot are there, so a credential cut off
|
|
31
|
+
* later in the log line is still redacted whole.
|
|
32
|
+
* adm_ `adm_<43 base64url>`, the older operator code (`generateCode`: 32 random bytes).
|
|
33
|
+
* Exactly 43 characters, because that is the only length it has.
|
|
34
|
+
*
|
|
35
|
+
* `api/server/services/HostedPreview/__tests__/telemetryRedaction.spec.js` mints credentials with the real minting
|
|
36
|
+
* code and requires every one to come out as the marker, so a change to either side fails there.
|
|
37
|
+
*
|
|
19
38
|
* WHAT IT DOES NOT. A prefix that is itself percent-encoded (`%70vw_`) is not recognised: nothing in this
|
|
20
|
-
* repository writes one, and a scan that decoded every string first would cost every sink on every record.
|
|
21
|
-
*
|
|
22
|
-
* stays as it is
|
|
39
|
+
* repository writes one, and a scan that decoded every string first would cost every sink on every record. A
|
|
40
|
+
* credential cut off before its id is whole (`pinv_0123abc`) is an identifier, not yet the secret, and is left as it
|
|
41
|
+
* is. The request log's own `/[credential]` rewrite stays as it is, and is looser (any `wsi_`, `pinv_`, `usr_`,
|
|
42
|
+
* `adm_`, `adm2_` or `pvw_` path segment), because a path segment is a place a credential is known to be.
|
|
23
43
|
*
|
|
24
44
|
* COST. Linear in the input. The only nested repetition is `%(?:25)*XX`, and `XX` is never `25`, so the engine
|
|
25
45
|
* cannot read one run of `25`s two ways; the tests feed it a megabyte of the worst shapes.
|
|
@@ -43,11 +63,36 @@ const TOKEN_CHAR = '(?:[A-Za-z0-9._-]|%(?:25)*(?:2[DdEe]|3[0-9]|4[1-9A-Fa-f]|5[0
|
|
|
43
63
|
* nothing and redacting twice changes nothing.
|
|
44
64
|
*/
|
|
45
65
|
const PREVIEW_TOKEN = new RegExp(`pvw(?:_|%(?:25)*5[Ff])${TOKEN_CHAR}+`, 'g');
|
|
66
|
+
/**
|
|
67
|
+
* A prefix's underscore, which (like the token's own characters) may be written as a percent-escape, once or several
|
|
68
|
+
* times; and the dot that ends an id.
|
|
69
|
+
*/
|
|
70
|
+
const UNDERSCORE = '(?:_|%(?:25)*5[Ff])';
|
|
71
|
+
const DOT = '(?:\\.|%(?:25)*2[Ee])';
|
|
72
|
+
/**
|
|
73
|
+
* `wsi`, `pinv`, `usr` or `adm2`, an underscore, and then a lookahead that insists on what the minting code writes
|
|
74
|
+
* next: 32 lowercase hex characters and the dot that ends them. Everything the credential is made of follows, and the
|
|
75
|
+
* prefix is captured so the marker can say which kind it was. `usr_<40 hex>`, `usr_00000001` and `/usr_profile` have no
|
|
76
|
+
* dot after exactly 32 hex characters, so they match nothing.
|
|
77
|
+
*/
|
|
78
|
+
const SIGNED_CREDENTIAL = new RegExp(`(wsi|pinv|usr|adm2)${UNDERSCORE}(?=[0-9a-f]{32}${DOT})${TOKEN_CHAR}+`, 'g');
|
|
79
|
+
/**
|
|
80
|
+
* The older operator code: `adm_` and exactly 43 base64url characters (32 random bytes), not followed by another one.
|
|
81
|
+
* A shorter or longer run of letters is a name, not this credential. The characters are the plain alphabet and not
|
|
82
|
+
* `TOKEN_CHAR`, whose dot would swallow the full stop at the end of a sentence.
|
|
83
|
+
*/
|
|
84
|
+
const LEGACY_OPERATOR_CODE = new RegExp(`(adm)${UNDERSCORE}(?=[A-Za-z0-9_-]{43}(?![A-Za-z0-9_-]))[A-Za-z0-9_-]{43}`, 'g');
|
|
85
|
+
/** Cheap test before any of the expressions: a string with none of these cannot hold a credential. */
|
|
86
|
+
const CREDENTIAL_HINTS = ['pvw', 'wsi', 'pinv', 'usr', 'adm'];
|
|
87
|
+
const credentialMarker = (_match, prefix) => `${prefix}_[redacted]`;
|
|
46
88
|
export function redactPreviewTokens(value) {
|
|
47
|
-
if (typeof value !== 'string' || value.indexOf(
|
|
89
|
+
if (typeof value !== 'string' || !CREDENTIAL_HINTS.some((hint) => value.indexOf(hint) !== -1)) {
|
|
48
90
|
return value;
|
|
49
91
|
}
|
|
50
|
-
return value
|
|
92
|
+
return value
|
|
93
|
+
.replace(PREVIEW_TOKEN, PREVIEW_TOKEN_REDACTION)
|
|
94
|
+
.replace(SIGNED_CREDENTIAL, credentialMarker)
|
|
95
|
+
.replace(LEGACY_OPERATOR_CODE, credentialMarker);
|
|
51
96
|
}
|
|
52
97
|
const DEFAULT_MAX_NODES = 50_000;
|
|
53
98
|
const DEFAULT_MAX_DEPTH = 32;
|