@skrr-ai/cli 0.1.143 → 0.1.145
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 +13 -0
- package/dist/commands/agenda/plan.d.ts +7 -0
- package/dist/commands/agenda/plan.js +17 -0
- package/dist/commands/agenda/trigger/create.js +4 -2
- package/dist/commands/agenda/trigger/list.js +7 -7
- package/dist/commands/agent/message/approve.d.ts +17 -0
- package/dist/commands/agent/message/approve.js +70 -0
- package/dist/commands/agent/message/decline.d.ts +17 -0
- package/dist/commands/agent/message/decline.js +70 -0
- package/dist/commands/agent/message/pending.d.ts +18 -0
- package/dist/commands/agent/message/pending.js +79 -0
- package/dist/commands/agents/delete.d.ts +45 -0
- package/dist/commands/agents/delete.js +139 -2
- package/dist/commands/agents/plan-day.d.ts +50 -7
- package/dist/commands/agents/plan-day.js +293 -65
- package/dist/commands/agents/proactive-audit.d.ts +22 -0
- package/dist/commands/agents/proactive-audit.js +86 -0
- package/dist/commands/agents/schedule-overview.d.ts +7 -0
- package/dist/commands/agents/schedule-overview.js +49 -5
- package/dist/commands/agents/schedule-trace.js +42 -21
- package/dist/commands/agents/spawn.d.ts +78 -1
- package/dist/commands/agents/spawn.js +262 -6
- package/dist/commands/agents/todos/list.d.ts +5 -0
- package/dist/commands/agents/todos/list.js +19 -5
- package/dist/commands/agents/triggers/create.js +1 -1
- package/dist/commands/agents/triggers/update.js +1 -1
- package/dist/commands/agents/upcoming.d.ts +1 -0
- package/dist/commands/agents/upcoming.js +18 -7
- package/dist/commands/commitments/create.js +14 -4
- package/dist/commands/commitments/preflight.js +14 -3
- package/dist/commands/commitments/update.js +1 -1
- package/dist/commands/initiatives/worker/deactivate.d.ts +23 -0
- package/dist/commands/initiatives/worker/deactivate.js +78 -0
- package/dist/commands/login.js +8 -2
- package/dist/commands/logout.d.ts +20 -0
- package/dist/commands/logout.js +110 -5
- package/dist/commands/memory/maintain.js +16 -2
- package/dist/commands/spaces/delete.js +6 -1
- package/dist/commands/spaces/workflow-templates/insert.js +4 -0
- package/dist/commands/spaces/workflows/archive.js +6 -1
- package/dist/commands/spaces/workflows/publish.js +3 -1
- package/dist/commands/spaces/workflows/run.d.ts +1 -0
- package/dist/commands/spaces/workflows/run.js +17 -1
- package/dist/commands/spaces/workflows/triggers/create.js +3 -1
- package/dist/commands/store/show.js +22 -0
- package/dist/commands/tasks/workflow-context.js +3 -1
- package/dist/commands/triggers/capabilities.js +17 -1
- package/dist/commands/triggers/create.d.ts +2 -0
- package/dist/commands/triggers/create.js +23 -7
- package/dist/commands/triggers/fire-detail.js +12 -3
- package/dist/commands/triggers/list.d.ts +1 -0
- package/dist/commands/triggers/list.js +13 -1
- package/dist/commands/triggers/preflight.js +18 -0
- package/dist/commands/triggers/prune.js +9 -5
- package/dist/commands/triggers/update.js +13 -4
- package/dist/generated/agent-guides.json +35 -35
- package/dist/lib/agent-proactive-baseline.js +7 -1
- package/dist/lib/agentic-stream.d.ts +7 -0
- package/dist/lib/agentic-stream.js +22 -0
- package/dist/lib/commitments.d.ts +16 -9
- package/dist/lib/commitments.js +78 -5
- package/dist/lib/compasses.js +1 -1
- package/dist/lib/daemon-setup.js +9 -3
- package/dist/lib/daemonBroker.d.ts +7 -0
- package/dist/lib/daemonBroker.js +5 -0
- package/dist/lib/daemonHandoff.d.ts +2 -0
- package/dist/lib/daemonHandoff.js +10 -1
- package/dist/lib/daemonIslandProfile.d.ts +19 -0
- package/dist/lib/daemonIslandProfile.js +41 -0
- package/dist/lib/dedicated-power.js +10 -3
- package/dist/lib/format.d.ts +47 -0
- package/dist/lib/format.js +136 -1
- package/dist/lib/initiatives-worker.d.ts +25 -0
- package/dist/lib/initiatives-worker.js +13 -0
- package/dist/lib/login.d.ts +7 -0
- package/dist/lib/login.js +5 -0
- package/dist/lib/planOutcome.d.ts +51 -0
- package/dist/lib/planOutcome.js +88 -0
- package/dist/lib/proactive-audit.d.ts +52 -0
- package/dist/lib/proactive-audit.js +67 -0
- package/dist/lib/proactiveApi.d.ts +71 -0
- package/dist/lib/proactiveApi.js +10 -1
- package/dist/lib/refresh.d.ts +20 -6
- package/dist/lib/refresh.js +27 -9
- package/dist/lib/roles.d.ts +1 -1
- package/dist/lib/schedule.d.ts +214 -10
- package/dist/lib/schedule.js +317 -21
- package/dist/lib/triggers.d.ts +139 -3
- package/dist/lib/triggers.js +382 -18
- package/dist/lib/workflow-node-control.js +8 -0
- package/dist/lib/workflow-run-view.js +9 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.d.ts +1 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/index.js +2 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/refresh.d.ts +22 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/refresh.js +15 -4
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.d.ts +1 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/index.js +1 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/refresh.d.ts +22 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/refresh.js +22 -4
- package/dist/node_modules/@skrr-ai/data-provider/index.js +5252 -5211
- package/oclif.manifest.json +526 -29
- package/package.json +1 -1
package/dist/lib/triggers.d.ts
CHANGED
|
@@ -82,6 +82,17 @@ export declare function validateEventFilter(input: {
|
|
|
82
82
|
filterField?: string;
|
|
83
83
|
filterValues?: string[];
|
|
84
84
|
}): void;
|
|
85
|
+
export interface SchedulerLimits {
|
|
86
|
+
state: 'ok' | 'reached';
|
|
87
|
+
reason?: string;
|
|
88
|
+
claimedToday?: number;
|
|
89
|
+
maxPerDay?: number | null;
|
|
90
|
+
claimedTotal?: number;
|
|
91
|
+
maxRuns?: number | null;
|
|
92
|
+
triggerFireCount?: number;
|
|
93
|
+
triggerFiresToday?: number;
|
|
94
|
+
note?: string;
|
|
95
|
+
}
|
|
85
96
|
export interface TriggerDefinition {
|
|
86
97
|
id?: string;
|
|
87
98
|
kind?: string;
|
|
@@ -153,6 +164,14 @@ export interface TriggerDefinition {
|
|
|
153
164
|
*/
|
|
154
165
|
autonomy?: 'runs' | 'suggests_only';
|
|
155
166
|
autonomyNote?: string;
|
|
167
|
+
/**
|
|
168
|
+
* Server-DERIVED reading of the scheduler's own run limits (OSK-22526): present on `GET
|
|
169
|
+
* /api/triggers/:id`, and on a list read with `?include=limits`, only for a schedule that forwards
|
|
170
|
+
* `--max-runs` / `--max-fires-per-day`. `reached` means the scheduler will skip the next slot
|
|
171
|
+
* whatever the trigger's own counters say. Absent means UNKNOWN (an older server, a schedule with no
|
|
172
|
+
* limit, a read that failed), never "fine".
|
|
173
|
+
*/
|
|
174
|
+
schedulerLimits?: SchedulerLimits;
|
|
156
175
|
createdAt?: string;
|
|
157
176
|
updatedAt?: string;
|
|
158
177
|
}
|
|
@@ -185,8 +204,43 @@ export interface TriggerFireRecord {
|
|
|
185
204
|
};
|
|
186
205
|
/** The refusal record could not be read for this fire, which is not "none were refused". */
|
|
187
206
|
permissionRefusalsUnread?: boolean;
|
|
207
|
+
/** What became of the inbox card a policy-skipped fire was supposed to leave (OSK-21911). */
|
|
208
|
+
policyCard?: TriggerPolicyCard;
|
|
209
|
+
/** A built-in action's result; Smart Schedule's carries why it did or did not leave a plan. */
|
|
210
|
+
builtinAction?: {
|
|
211
|
+
builtinType?: string;
|
|
212
|
+
planOutcome?: unknown;
|
|
213
|
+
};
|
|
214
|
+
/** The working / quiet window that skipped this fire, as the server judged it (OSK-22528). */
|
|
215
|
+
window?: SkippedWindowRecord;
|
|
188
216
|
};
|
|
189
217
|
}
|
|
218
|
+
/**
|
|
219
|
+
* `metadata.window` on a fire the trigger's own working or quiet window skipped. Absent on a fire
|
|
220
|
+
* recorded before the server kept it, and on a skip the platform scheduler recorded.
|
|
221
|
+
*/
|
|
222
|
+
export interface SkippedWindowRecord {
|
|
223
|
+
kind?: string;
|
|
224
|
+
start?: string;
|
|
225
|
+
end?: string;
|
|
226
|
+
/** The zone the window was read in; UTC when the window sets none. */
|
|
227
|
+
timezone?: string;
|
|
228
|
+
timezoneDefaulted?: boolean;
|
|
229
|
+
/** The instant the window was judged at. */
|
|
230
|
+
evaluatedAt?: string;
|
|
231
|
+
/** That instant as a clock time in `timezone`; null when the zone could not be read. */
|
|
232
|
+
localTime?: string | null;
|
|
233
|
+
}
|
|
234
|
+
/** `metadata.policyCard` on a policy-skipped fire. `reason` is a closed code, absent when a card was written. */
|
|
235
|
+
export interface TriggerPolicyCard {
|
|
236
|
+
/** This occurrence wrote a new card. */
|
|
237
|
+
created?: boolean;
|
|
238
|
+
/** A card that was already there covers this occurrence. */
|
|
239
|
+
existing?: boolean;
|
|
240
|
+
initiativeId?: string;
|
|
241
|
+
mode?: string;
|
|
242
|
+
reason?: string;
|
|
243
|
+
}
|
|
190
244
|
export interface TriggerListResponse {
|
|
191
245
|
triggers: TriggerDefinition[];
|
|
192
246
|
}
|
|
@@ -269,6 +323,8 @@ export interface SpaceAssistantResponse {
|
|
|
269
323
|
*/
|
|
270
324
|
export declare const SCOPE_IMPLIED_REF_KEY: Partial<Record<TriggerScopeKind, string>>;
|
|
271
325
|
export declare function parseKeyValueFlags(values: string[] | undefined, flagName: string, scopeKind?: string): Record<string, string>;
|
|
326
|
+
/** `--ref agentId=abc` as the `agent:abc` the list filter takes. Throws for a key that filters nothing. */
|
|
327
|
+
export declare function refEntitiesFromRefFlags(values: string[] | undefined): string[];
|
|
272
328
|
export declare function parseJsonObject(raw: string | undefined, flagName: string): Record<string, unknown> | undefined;
|
|
273
329
|
/**
|
|
274
330
|
* A JSON-array flag value: inline JSON, `@path` (a file), or a bare path to an existing file. A
|
|
@@ -527,6 +583,20 @@ export declare function formatDuplicateSubscriptionWarning(trigger: unknown): {
|
|
|
527
583
|
warning: string;
|
|
528
584
|
lines: string[];
|
|
529
585
|
} | null;
|
|
586
|
+
/**
|
|
587
|
+
* Advice about a window the trigger was just saved with, one sentence each, or none. The window was
|
|
588
|
+
* accepted; these say how it will be read (in UTC when it names no zone, as an empty quiet window that
|
|
589
|
+
* suppresses nothing), so a person finds out now and not from the first skipped fire (OSK-22530).
|
|
590
|
+
*/
|
|
591
|
+
export declare function windowAuthoringAdvice(trigger: unknown): string[];
|
|
592
|
+
/** What `--working-hours` / `--quiet-hours` take, for their `--help`. */
|
|
593
|
+
export declare const TRIGGER_WINDOW_FLAG_HELP = "JSON object {\"enabled\":true,\"start\":\"09:00\",\"end\":\"17:00\",\"timezone\":\"America/Vancouver\"}. \"enabled\" is required for the window to apply, and with no \"timezone\" it is read in UTC, not in the trigger's own zone.";
|
|
594
|
+
/**
|
|
595
|
+
* Why a schedule whose own counters look healthy will not run, in the scheduler's numbers. The
|
|
596
|
+
* scheduler charges a limit when it claims a slot, so it can hold more than the trigger counts; once
|
|
597
|
+
* the limit is reached it drops every later slot without running or recording it (OSK-22526).
|
|
598
|
+
*/
|
|
599
|
+
export declare function schedulerLimitSentence(limits: SchedulerLimits): string;
|
|
530
600
|
/**
|
|
531
601
|
* Human phrasing for a trigger's enabled state (OSK-4886).
|
|
532
602
|
*
|
|
@@ -539,7 +609,9 @@ export declare function armedStateLabel(enabled: boolean | undefined, lastResult
|
|
|
539
609
|
oneShot?: {
|
|
540
610
|
fires?: number;
|
|
541
611
|
failures?: number;
|
|
542
|
-
} | null
|
|
612
|
+
} | null,
|
|
613
|
+
/** The server's reading of the scheduler's run limits: a reached limit means no slot will run (OSK-22526). */
|
|
614
|
+
schedulerLimits?: SchedulerLimits | null): string;
|
|
543
615
|
/**
|
|
544
616
|
* Human phrasing for an effect trigger's write mode (OSK-4886).
|
|
545
617
|
*
|
|
@@ -579,22 +651,69 @@ export declare function toolsRefusedHintLines(trigger: TriggerDefinition, kinds:
|
|
|
579
651
|
* for one.
|
|
580
652
|
*/
|
|
581
653
|
export declare function fireRefusalLines(metadata: unknown): string[];
|
|
654
|
+
/** The `--mode` flag's help, shared so create and update never describe the modes differently. */
|
|
655
|
+
export declare const TRIGGER_MODE_FLAG_DESCRIPTION = "Execution mode. send_message runs an Agent turn and posts its reply to the destination chat; run_only runs an Agent turn and posts nothing visible (it still uses the Agent\u2019s model budget).";
|
|
656
|
+
export declare function executorModeEffect(mode: unknown): string | undefined;
|
|
657
|
+
/**
|
|
658
|
+
* The text of the `Debounce:` line of `triggers show`. An event trigger carries a trigger-wide debounce (30s unless
|
|
659
|
+
* set), and neither its size nor its meaning was shown anywhere but raw JSON: a person deciding whether
|
|
660
|
+
* two close events both fire could not tell that the second is skipped, not queued, whatever its
|
|
661
|
+
* subject (OSK-21756). Undefined when there is nothing to say.
|
|
662
|
+
*/
|
|
663
|
+
export declare function debounceSummaryLine(trigger: TriggerDefinition): string | undefined;
|
|
664
|
+
/**
|
|
665
|
+
* When a schedule or one-shot trigger runs, in the zone it runs in (OSK-22487).
|
|
666
|
+
*
|
|
667
|
+
* `triggers create` and `triggers show` printed the kind, the mode and `Fires: 0 succeeded` and nothing
|
|
668
|
+
* about WHEN, so a schedule made without `--timezone` (which stores UTC) looked the same as one made
|
|
669
|
+
* for the person's own morning, eight hours apart. The zone is stated always, and the same instant is
|
|
670
|
+
* restated on this machine's clock when the two differ, so "09:30" cannot be mistaken for local time.
|
|
671
|
+
* A disabled trigger's next occurrence is labelled as conditional: nothing will run until it is enabled.
|
|
672
|
+
*
|
|
673
|
+
* Undefined for a kind with no clock (event, on_demand, ...). `machineZone` is a parameter so the text
|
|
674
|
+
* is deterministic under test.
|
|
675
|
+
*/
|
|
676
|
+
export declare function scheduleSummaryLine(trigger: TriggerDefinition, machineZone?: string | undefined): string | undefined;
|
|
677
|
+
/** What a builtin_action trigger does, from its stored action: the type and its config. */
|
|
678
|
+
export declare function builtinActionLine(trigger: TriggerDefinition): string | undefined;
|
|
582
679
|
export declare function renderTriggerSummary(trigger: TriggerDefinition, log: (line: string) => void, options?: {
|
|
583
680
|
baseURL?: string;
|
|
584
681
|
}): void;
|
|
585
682
|
export declare function renderLegacyRuns(runs: LegacyTriggerRun[], log: (line: string) => void): void;
|
|
586
|
-
/**
|
|
587
|
-
|
|
683
|
+
/**
|
|
684
|
+
* Why a fire was skipped by a working or quiet window, in words. Both trigger-level windows (Gate 5)
|
|
685
|
+
* consume the occurrence: a one-shot is spent, a recurring schedule carries on to its next slot, and
|
|
686
|
+
* nothing is retried. The Agent's own quiet hours (`initiative_policy_quiet_hours`) are a separate
|
|
687
|
+
* policy that can hold a one-shot, so that wording stays hedged.
|
|
688
|
+
*/
|
|
689
|
+
export declare function clockSkipAuditExplanation(fire: {
|
|
588
690
|
source?: unknown;
|
|
589
691
|
reason?: unknown;
|
|
590
692
|
outcome?: unknown;
|
|
693
|
+
metadata?: unknown;
|
|
591
694
|
}): {
|
|
592
695
|
summary: string;
|
|
593
696
|
detail: string;
|
|
594
697
|
} | null;
|
|
698
|
+
/**
|
|
699
|
+
* Why a coalesced occurrence did not run. `coalesced` with reason `in_flight` is the concurrency lane
|
|
700
|
+
* (gate 7) finding an earlier fire still holding it: this occurrence was dropped, not queued, and an
|
|
701
|
+
* occurrence that was dropped is consumed, so it is not retried (OSK-22509). The raw code alone read
|
|
702
|
+
* as a fire that was still in progress.
|
|
703
|
+
*/
|
|
704
|
+
export declare function coalescedAuditExplanation(fire: {
|
|
705
|
+
outcome?: unknown;
|
|
706
|
+
reason?: unknown;
|
|
707
|
+
}): {
|
|
708
|
+
summary: string;
|
|
709
|
+
detail: string;
|
|
710
|
+
} | null;
|
|
711
|
+
/** One sentence saying whether the fire left an inbox card, or null for a fire that predates the record. */
|
|
712
|
+
export declare function policyCardSentence(policyCard: unknown): string | null;
|
|
595
713
|
export declare function policyAuditExplanation(fire: {
|
|
596
714
|
outcome?: unknown;
|
|
597
715
|
reason?: unknown;
|
|
716
|
+
metadata?: unknown;
|
|
598
717
|
}): {
|
|
599
718
|
summary: string;
|
|
600
719
|
detail: string;
|
|
@@ -610,10 +729,13 @@ export interface TriggerQuotaStatus {
|
|
|
610
729
|
scopeKind: string;
|
|
611
730
|
active: number;
|
|
612
731
|
limit: number;
|
|
732
|
+
/** True when the limit is the platform ceiling, i.e. the owner has no cap of their own. */
|
|
733
|
+
unlimited?: boolean;
|
|
613
734
|
remaining: number;
|
|
614
735
|
reclaimable: number;
|
|
615
736
|
perUser: number;
|
|
616
737
|
perUserLimit: number;
|
|
738
|
+
perUserUnlimited?: boolean;
|
|
617
739
|
perUserRemaining: number;
|
|
618
740
|
/** Workspace used by the admission counter; null means the unscoped counter. */
|
|
619
741
|
counterWorkspaceId?: string | null;
|
|
@@ -625,6 +747,20 @@ export interface TriggerQuotaStatus {
|
|
|
625
747
|
*/
|
|
626
748
|
perUserReclaimable: number;
|
|
627
749
|
}
|
|
750
|
+
/**
|
|
751
|
+
* The largest finite trigger limit the server accepts. An owner with no cap of
|
|
752
|
+
* their own resolves to exactly this, so a limit at or above it means "no limit"
|
|
753
|
+
* and printing it as a number reads as a budget (OSK-22402). A server new enough
|
|
754
|
+
* to say `unlimited` is believed; an older one is judged by the value.
|
|
755
|
+
*/
|
|
756
|
+
export declare const TRIGGER_LIMIT_CEILING = 100000000;
|
|
757
|
+
/** `used / limit (free free)`, or `used / unlimited` when there is no cap. */
|
|
758
|
+
export declare function describeTriggerBudget(budget: {
|
|
759
|
+
used: number;
|
|
760
|
+
limit: number;
|
|
761
|
+
free: number;
|
|
762
|
+
unlimited?: boolean;
|
|
763
|
+
}): string;
|
|
628
764
|
export declare const triggerApi: {
|
|
629
765
|
create: (body: Record<string, unknown>) => Promise<TriggerDefinition>;
|
|
630
766
|
list: (path: string) => Promise<TriggerListResponse>;
|