@skrr-ai/cli 0.1.109 → 0.1.111
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/bin/run.js +15 -1
- package/dist/base-command.d.ts +44 -1
- package/dist/base-command.js +194 -33
- package/dist/commands/actions/list.js +2 -1
- package/dist/commands/agenda/trigger/create.js +1 -1
- package/dist/commands/agenda/trigger/list.js +2 -1
- package/dist/commands/agent-groups/list.js +2 -1
- package/dist/commands/agents/actions/list.js +2 -1
- package/dist/commands/agents/always-on/status.js +5 -0
- package/dist/commands/agents/chat.js +4 -1
- package/dist/commands/agents/duplicate.js +4 -0
- package/dist/commands/agents/eval/list.js +2 -1
- package/dist/commands/agents/files/list.js +2 -1
- package/dist/commands/agents/folders/list.js +2 -1
- package/dist/commands/agents/goals/list.js +2 -1
- package/dist/commands/agents/intuitions/list.js +8 -5
- package/dist/commands/agents/list.d.ts +12 -0
- package/dist/commands/agents/list.js +45 -8
- package/dist/commands/agents/releases/known-issues/list.js +2 -1
- package/dist/commands/agents/releases/list.js +5 -1
- package/dist/commands/agents/releases/trusted-publishers/list.js +2 -1
- package/dist/commands/agents/roles/list.js +2 -1
- package/dist/commands/agents/skills/list.js +2 -1
- package/dist/commands/agents/todos/list.js +2 -1
- package/dist/commands/agents/triggers/create.js +1 -1
- package/dist/commands/agents/triggers/list.js +2 -1
- package/dist/commands/agents/triggers/update.js +1 -1
- package/dist/commands/agents/update.d.ts +11 -0
- package/dist/commands/agents/update.js +58 -2
- package/dist/commands/api-keys/list.js +2 -1
- package/dist/commands/apps/channel.d.ts +20 -0
- package/dist/commands/apps/channel.js +64 -0
- package/dist/commands/apps/check-draft.d.ts +12 -0
- package/dist/commands/apps/check-draft.js +41 -0
- package/dist/commands/apps/check.d.ts +42 -0
- package/dist/commands/apps/check.js +91 -0
- package/dist/commands/apps/create.d.ts +15 -0
- package/dist/commands/apps/create.js +59 -0
- package/dist/commands/apps/data/put.d.ts +18 -0
- package/dist/commands/apps/data/put.js +72 -0
- package/dist/commands/apps/data/query.d.ts +20 -0
- package/dist/commands/apps/data/query.js +88 -0
- package/dist/commands/apps/disclosure.d.ts +16 -0
- package/dist/commands/apps/disclosure.js +71 -0
- package/dist/commands/apps/file/cat.d.ts +15 -0
- package/dist/commands/apps/file/cat.js +50 -0
- package/dist/commands/apps/file/ls.d.ts +13 -0
- package/dist/commands/apps/file/ls.js +47 -0
- package/dist/commands/apps/file/mv.d.ts +15 -0
- package/dist/commands/apps/file/mv.js +49 -0
- package/dist/commands/apps/file/rm.d.ts +15 -0
- package/dist/commands/apps/file/rm.js +53 -0
- package/dist/commands/apps/file/write.d.ts +17 -0
- package/dist/commands/apps/file/write.js +81 -0
- package/dist/commands/apps/install.d.ts +19 -0
- package/dist/commands/apps/install.js +136 -0
- package/dist/commands/apps/installations/list.d.ts +11 -0
- package/dist/commands/apps/installations/list.js +49 -0
- package/dist/commands/apps/installations/show.d.ts +12 -0
- package/dist/commands/apps/installations/show.js +61 -0
- package/dist/commands/apps/layout/set.d.ts +11 -0
- package/dist/commands/apps/layout/set.js +125 -0
- package/dist/commands/apps/layout/show.d.ts +9 -0
- package/dist/commands/apps/layout/show.js +33 -0
- package/dist/commands/apps/list.d.ts +10 -0
- package/dist/commands/apps/list.js +45 -0
- package/dist/commands/apps/logs.d.ts +13 -0
- package/dist/commands/apps/logs.js +55 -0
- package/dist/commands/apps/preview.d.ts +12 -0
- package/dist/commands/apps/preview.js +39 -0
- package/dist/commands/apps/publish/propose.d.ts +14 -0
- package/dist/commands/apps/publish/propose.js +45 -0
- package/dist/commands/apps/pull.d.ts +14 -0
- package/dist/commands/apps/pull.js +56 -0
- package/dist/commands/apps/push.d.ts +15 -0
- package/dist/commands/apps/push.js +75 -0
- package/dist/commands/apps/reconsent.d.ts +13 -0
- package/dist/commands/apps/reconsent.js +67 -0
- package/dist/commands/apps/report.d.ts +20 -0
- package/dist/commands/apps/report.js +63 -0
- package/dist/commands/apps/resume.d.ts +12 -0
- package/dist/commands/apps/resume.js +36 -0
- package/dist/commands/apps/settings/set.d.ts +13 -0
- package/dist/commands/apps/settings/set.js +54 -0
- package/dist/commands/apps/settings/show.d.ts +11 -0
- package/dist/commands/apps/settings/show.js +31 -0
- package/dist/commands/apps/show.d.ts +12 -0
- package/dist/commands/apps/show.js +49 -0
- package/dist/commands/apps/suspend.d.ts +12 -0
- package/dist/commands/apps/suspend.js +35 -0
- package/dist/commands/apps/uninstall.d.ts +13 -0
- package/dist/commands/apps/uninstall.js +43 -0
- package/dist/commands/apps/upgrade.d.ts +14 -0
- package/dist/commands/apps/upgrade.js +49 -0
- package/dist/commands/apps/version/create.d.ts +14 -0
- package/dist/commands/apps/version/create.js +53 -0
- package/dist/commands/apps/version/show.d.ts +12 -0
- package/dist/commands/apps/version/show.js +39 -0
- package/dist/commands/apps/versions.d.ts +12 -0
- package/dist/commands/apps/versions.js +40 -0
- package/dist/commands/apps/webhooks/list.d.ts +12 -0
- package/dist/commands/apps/webhooks/list.js +47 -0
- package/dist/commands/characters/list.js +2 -1
- package/dist/commands/chats/files/list.js +2 -1
- package/dist/commands/chats/folders/list.js +2 -1
- package/dist/commands/chats/list.js +2 -1
- package/dist/commands/chats/spaces/list.js +2 -1
- package/dist/commands/chats/widgets/list.js +2 -1
- package/dist/commands/code/jobs/list.js +4 -1
- package/dist/commands/commerce/incidents/list.js +2 -1
- package/dist/commands/commitments/accounting.js +3 -0
- package/dist/commands/commitments/action-proposals.d.ts +8 -0
- package/dist/commands/commitments/action-proposals.js +17 -2
- package/dist/commands/commitments/cost.d.ts +11 -0
- package/dist/commands/commitments/cost.js +25 -0
- package/dist/commands/commitments/create.js +6 -1
- package/dist/commands/commitments/endpoints/list.js +2 -1
- package/dist/commands/commitments/links/list.js +2 -1
- package/dist/commands/commitments/list.js +2 -1
- package/dist/commands/commitments/liveness.d.ts +30 -0
- package/dist/commands/commitments/liveness.js +22 -5
- package/dist/commands/commitments/pack/list.js +2 -1
- package/dist/commands/commitments/preflight.js +6 -2
- package/dist/commands/commitments/update.js +10 -1
- package/dist/commands/compass/list.js +2 -1
- package/dist/commands/context.js +7 -1
- package/dist/commands/convos/list.js +3 -2
- package/dist/commands/daemon/install.js +17 -1
- package/dist/commands/daemon/login.js +14 -0
- package/dist/commands/dm/list.js +2 -1
- package/dist/commands/dm/work.d.ts +19 -0
- package/dist/commands/dm/work.js +54 -0
- package/dist/commands/feeds/list.js +2 -1
- package/dist/commands/followups/list.js +2 -1
- package/dist/commands/followups/plans/cancel.d.ts +13 -0
- package/dist/commands/followups/plans/cancel.js +26 -0
- package/dist/commands/followups/plans/create.d.ts +11 -0
- package/dist/commands/followups/plans/create.js +35 -0
- package/dist/commands/followups/plans/list.d.ts +13 -0
- package/dist/commands/followups/plans/list.js +50 -0
- package/dist/commands/followups/plans/observability.d.ts +11 -0
- package/dist/commands/followups/plans/observability.js +46 -0
- package/dist/commands/followups/plans/revise.d.ts +13 -0
- package/dist/commands/followups/plans/revise.js +35 -0
- package/dist/commands/followups/plans/show.d.ts +11 -0
- package/dist/commands/followups/plans/show.js +32 -0
- package/dist/commands/goals/key-results/list.js +2 -1
- package/dist/commands/goals/labels/list.js +3 -2
- package/dist/commands/goals/list.js +3 -2
- package/dist/commands/grants/list.js +2 -1
- package/dist/commands/harnesses/grants/list.js +2 -1
- package/dist/commands/harnesses/leases/list.js +2 -1
- package/dist/commands/harnesses/list.js +10 -1
- package/dist/commands/harnesses/prune.d.ts +26 -0
- package/dist/commands/harnesses/prune.js +172 -0
- package/dist/commands/ingress/list.js +2 -1
- package/dist/commands/initiatives/list.js +2 -1
- package/dist/commands/instruction-blocks/list.js +2 -1
- package/dist/commands/instructions/list.js +2 -1
- package/dist/commands/integrations/connections/list.js +2 -1
- package/dist/commands/integrations/tools/list.js +2 -1
- package/dist/commands/labels/list.js +3 -2
- package/dist/commands/learning/adapters.d.ts +16 -0
- package/dist/commands/learning/adapters.js +44 -0
- package/dist/commands/login.js +11 -0
- package/dist/commands/machines/dedicated/list.js +2 -1
- package/dist/commands/machines/hosted/list.js +2 -1
- package/dist/commands/machines/list.js +2 -1
- package/dist/commands/machines/show.js +5 -2
- package/dist/commands/measures/list.js +2 -1
- package/dist/commands/memory/list.js +2 -1
- package/dist/commands/memory/proposals/list.js +2 -1
- package/dist/commands/memory/stores/list.js +2 -1
- package/dist/commands/memory/topics/list.js +2 -1
- package/dist/commands/memory/versions/list.js +2 -1
- package/dist/commands/messages/list.js +2 -1
- package/dist/commands/northstars/intents/list.js +2 -1
- package/dist/commands/northstars/list.js +2 -1
- package/dist/commands/northstars/recommendations/list.js +2 -1
- package/dist/commands/outbox/list.js +2 -1
- package/dist/commands/profiles/list.js +2 -1
- package/dist/commands/projects/docs/list.js +8 -1
- package/dist/commands/projects/updates/list.js +2 -1
- package/dist/commands/proposals/list.js +2 -1
- package/dist/commands/requests/comments/list.js +2 -1
- package/dist/commands/requests/list.js +2 -1
- package/dist/commands/shares/list.js +2 -1
- package/dist/commands/shortcuts/list.js +2 -1
- package/dist/commands/signals/monitors/list.js +2 -1
- package/dist/commands/signals/schemas/list.js +2 -1
- package/dist/commands/signals/sources/list.js +2 -1
- package/dist/commands/space-directory-views/list.js +2 -1
- package/dist/commands/spaces/actions/list.js +4 -3
- package/dist/commands/spaces/briefs/list.js +2 -1
- package/dist/commands/spaces/cycles/list.js +2 -1
- package/dist/commands/spaces/files/folders/list.js +2 -1
- package/dist/commands/spaces/files/list.js +3 -2
- package/dist/commands/spaces/heartbeats/list.js +3 -2
- package/dist/commands/spaces/labels/list.js +3 -2
- package/dist/commands/spaces/list.d.ts +3 -18
- package/dist/commands/spaces/list.js +28 -35
- package/dist/commands/spaces/live/cards/list.js +2 -1
- package/dist/commands/spaces/members/list.d.ts +1 -0
- package/dist/commands/spaces/members/list.js +4 -1
- package/dist/commands/spaces/show.js +2 -2
- package/dist/commands/spaces/skills/list.js +6 -2
- package/dist/commands/spaces/states/list.js +2 -1
- package/dist/commands/spaces/views/list.js +2 -1
- package/dist/commands/spaces/widgets/list.js +3 -2
- package/dist/commands/spaces/workflow-templates/list.js +2 -1
- package/dist/commands/spaces/workflows/fixtures/list.js +2 -1
- package/dist/commands/spaces/workflows/list.js +3 -2
- package/dist/commands/spaces/workflows/proposals/list.js +2 -1
- package/dist/commands/spaces/workflows/start.js +3 -1
- package/dist/commands/spaces/workflows/triggers/list.js +2 -1
- package/dist/commands/spaces/workflows/validate.js +12 -2
- package/dist/commands/store/acquisitions/list.js +2 -1
- package/dist/commands/store/admissions/list.js +17 -1
- package/dist/commands/store/advisories/list.js +2 -1
- package/dist/commands/store/follows/list.js +2 -1
- package/dist/commands/store/publishers/domains/list.js +2 -1
- package/dist/commands/store/reports/list.js +2 -1
- package/dist/commands/subscriptions/list.js +2 -1
- package/dist/commands/tasks/actionability.js +7 -30
- package/dist/commands/tasks/activity.js +14 -8
- package/dist/commands/tasks/approvals/list.js +2 -1
- package/dist/commands/tasks/assign.d.ts +1 -0
- package/dist/commands/tasks/assign.js +43 -7
- package/dist/commands/tasks/attachments/list.js +2 -1
- package/dist/commands/tasks/chat/send.js +34 -0
- package/dist/commands/tasks/comments/add.js +6 -1
- package/dist/commands/tasks/comments/list.js +2 -1
- package/dist/commands/tasks/complete.js +26 -2
- package/dist/commands/tasks/continue.d.ts +18 -0
- package/dist/commands/tasks/continue.js +54 -0
- package/dist/commands/tasks/create-tree.d.ts +5 -0
- package/dist/commands/tasks/create-tree.js +399 -219
- package/dist/commands/tasks/create.d.ts +1 -0
- package/dist/commands/tasks/create.js +63 -11
- package/dist/commands/tasks/deliverable/add.js +10 -3
- package/dist/commands/tasks/deliverable/list.js +2 -1
- package/dist/commands/tasks/events/list.js +2 -1
- package/dist/commands/tasks/execution-state.d.ts +12 -0
- package/dist/commands/tasks/execution-state.js +28 -0
- package/dist/commands/tasks/expectations/assess.js +40 -5
- package/dist/commands/tasks/guide.d.ts +10 -0
- package/dist/commands/tasks/guide.js +20 -0
- package/dist/commands/tasks/labels/list.js +2 -1
- package/dist/commands/tasks/list.d.ts +19 -0
- package/dist/commands/tasks/list.js +103 -6
- package/dist/commands/tasks/move.js +10 -2
- package/dist/commands/tasks/preflight.d.ts +14 -0
- package/dist/commands/tasks/preflight.js +77 -0
- package/dist/commands/tasks/rearm-recurrence.js +22 -3
- package/dist/commands/tasks/resource/list.js +2 -1
- package/dist/commands/tasks/result/submit.js +10 -1
- package/dist/commands/tasks/review.js +6 -1
- package/dist/commands/tasks/revisions.d.ts +2 -0
- package/dist/commands/tasks/revisions.js +8 -1
- package/dist/commands/tasks/show.d.ts +8 -0
- package/dist/commands/tasks/show.js +81 -43
- package/dist/commands/tasks/start.d.ts +1 -0
- package/dist/commands/tasks/start.js +35 -0
- package/dist/commands/tasks/templates/list.js +2 -1
- package/dist/commands/tasks/timeline.d.ts +5 -0
- package/dist/commands/tasks/timeline.js +9 -1
- package/dist/commands/tasks/unschedule.js +5 -1
- package/dist/commands/tasks/update.d.ts +1 -0
- package/dist/commands/tasks/update.js +36 -3
- package/dist/commands/tasks/updates/add.js +6 -1
- package/dist/commands/tasks/updates/list.js +2 -1
- package/dist/commands/tasks/upsert.d.ts +1 -0
- package/dist/commands/tasks/upsert.js +8 -1
- package/dist/commands/token/list.js +2 -1
- package/dist/commands/tokens/list.js +2 -1
- package/dist/commands/tones/list.js +4 -2
- package/dist/commands/triggers/audit.js +12 -3
- package/dist/commands/triggers/create.js +1 -1
- package/dist/commands/triggers/fire-detail.d.ts +7 -0
- package/dist/commands/triggers/fire-detail.js +30 -12
- package/dist/commands/triggers/fire.js +13 -3
- package/dist/commands/triggers/list.js +2 -1
- package/dist/commands/triggers/parse-intent.js +1 -1
- package/dist/commands/triggers/update.js +1 -1
- package/dist/commands/views/list.js +2 -1
- package/dist/commands/webhooks/list.js +2 -1
- package/dist/commands/whoami.js +1 -1
- package/dist/commands/widgets/list.js +2 -1
- package/dist/commands/widgets/save-as-app.d.ts +13 -0
- package/dist/commands/widgets/save-as-app.js +65 -0
- package/dist/commands/work-views/list.js +2 -1
- package/dist/commands/worklog/list.js +2 -1
- package/dist/commands/workspaces/grants.js +1 -4
- package/dist/commands/workspaces/list.js +3 -2
- package/dist/commands/workspaces/members.d.ts +1 -0
- package/dist/commands/workspaces/members.js +10 -7
- package/dist/generated/managed-instruction-guides.json +2 -2
- package/dist/help.js +7 -0
- package/dist/lib/agent-proactive-baseline.d.ts +9 -0
- package/dist/lib/agent-proactive-baseline.js +44 -0
- package/dist/lib/agentic-stream.d.ts +4 -1
- package/dist/lib/agentic-stream.js +29 -4
- package/dist/lib/appData.d.ts +75 -0
- package/dist/lib/appData.js +274 -0
- package/dist/lib/appInstallations.d.ts +117 -0
- package/dist/lib/appInstallations.js +960 -0
- package/dist/lib/appSettings.d.ts +3 -0
- package/dist/lib/appSettings.js +71 -0
- package/dist/lib/appWebhooks.d.ts +7 -0
- package/dist/lib/appWebhooks.js +59 -0
- package/dist/lib/apps-command.d.ts +44 -0
- package/dist/lib/apps-command.js +164 -0
- package/dist/lib/apps.d.ts +45 -0
- package/dist/lib/apps.js +148 -0
- package/dist/lib/appsCheck.d.ts +12 -0
- package/dist/lib/appsCheck.js +173 -0
- package/dist/lib/appsFs.d.ts +58 -0
- package/dist/lib/appsFs.js +384 -0
- package/dist/lib/auth-failure.d.ts +20 -0
- package/dist/lib/auth-failure.js +40 -3
- package/dist/lib/cli-installers.d.ts +9 -2
- package/dist/lib/command-miss.js +107 -0
- package/dist/lib/commitment-loop-status.js +25 -3
- package/dist/lib/commitment-product.js +5 -2
- package/dist/lib/commitments.d.ts +45 -3
- package/dist/lib/commitments.js +139 -41
- package/dist/lib/compasses.d.ts +4 -0
- package/dist/lib/compasses.js +11 -0
- package/dist/lib/daemon-machine-identity-copy.d.ts +14 -0
- package/dist/lib/daemon-machine-identity-copy.js +27 -0
- package/dist/lib/daemon-machine-identity.d.ts +27 -0
- package/dist/lib/daemon-machine-identity.js +61 -0
- package/dist/lib/daemon-setup.js +7 -7
- package/dist/lib/daemonHandoff.d.ts +19 -1
- package/dist/lib/daemonHandoff.js +62 -2
- package/dist/lib/dedicated-ssh.d.ts +2 -0
- package/dist/lib/dedicated-ssh.js +98 -28
- package/dist/lib/harnesses.d.ts +71 -0
- package/dist/lib/harnesses.js +70 -0
- package/dist/lib/json-output.d.ts +33 -0
- package/dist/lib/json-output.js +37 -0
- package/dist/lib/list-output.d.ts +9 -4
- package/dist/lib/list-output.js +38 -9
- package/dist/lib/lookbackPlans.d.ts +13 -0
- package/dist/lib/lookbackPlans.js +68 -0
- package/dist/lib/machines.d.ts +27 -6
- package/dist/lib/machines.js +25 -14
- package/dist/lib/member-output.d.ts +20 -0
- package/dist/lib/member-output.js +57 -0
- package/dist/lib/preflight-copy.d.ts +7 -0
- package/dist/lib/preflight-copy.js +31 -0
- package/dist/lib/profile-machine-identity-guard.js +11 -1
- package/dist/lib/roles.d.ts +2 -2
- package/dist/lib/task-admission.d.ts +9 -0
- package/dist/lib/task-admission.js +35 -0
- package/dist/lib/task-batch.d.ts +4 -0
- package/dist/lib/task-batch.js +2 -0
- package/dist/lib/task-economics.d.ts +10 -0
- package/dist/lib/task-economics.js +24 -2
- package/dist/lib/task-operations.d.ts +25 -0
- package/dist/lib/task-operations.js +123 -0
- package/dist/lib/task-preflight.d.ts +35 -0
- package/dist/lib/task-preflight.js +121 -0
- package/dist/lib/task-resource-references.d.ts +23 -0
- package/dist/lib/task-resource-references.js +119 -0
- package/dist/lib/task-spec-verification.d.ts +42 -0
- package/dist/lib/task-spec-verification.js +101 -0
- package/dist/lib/task-work.d.ts +11 -0
- package/dist/lib/task-work.js +41 -0
- package/dist/lib/task-write-attribution.d.ts +26 -0
- package/dist/lib/task-write-attribution.js +47 -0
- package/dist/lib/tasks.d.ts +13 -0
- package/dist/lib/tasks.js +61 -8
- package/dist/lib/triggers.d.ts +18 -0
- package/dist/lib/triggers.js +97 -5
- package/dist/lib/usage-discovery.d.ts +4 -0
- package/dist/lib/usage-discovery.js +14 -4
- package/dist/lib/widgetApps.d.ts +10 -0
- package/dist/lib/widgetApps.js +47 -0
- package/dist/lib/widgetStaticScan.js +25 -1
- package/dist/lib/workflow-run-view.d.ts +4 -0
- package/dist/lib/workflow-run-view.js +5 -0
- package/dist/lib/workspaces.d.ts +33 -9
- package/dist/lib/workspaces.js +19 -3
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/computerWire.d.ts +14 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/computerWire.js +47 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonToolApproval.d.ts +49 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonToolApproval.js +26 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonWire.d.ts +118 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/daemonWire.js +614 -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 +5 -3
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/machineUuid.d.ts +60 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/machineUuid.js +130 -6
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/refresh.d.ts +2 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/refresh.js +15 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/refreshClassification.d.ts +5 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/refreshClassification.js +3 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/sessionRevocation.d.ts +177 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/sessionRevocation.js +484 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/telemetryRedaction.d.ts +11 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/telemetryRedaction.js +46 -7
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/toolApprovalSignature.d.ts +232 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/toolApprovalSignature.js +372 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/types.d.ts +17 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/types.js +12 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/computerWire.d.ts +14 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/computerWire.js +45 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonToolApproval.d.ts +49 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonToolApproval.js +24 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonWire.d.ts +118 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/daemonWire.js +608 -0
- 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/machineUuid.d.ts +60 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/machineUuid.js +128 -6
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/refresh.d.ts +2 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/refresh.js +15 -2
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/refreshClassification.d.ts +5 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/refreshClassification.js +3 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/sessionRevocation.d.ts +177 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/sessionRevocation.js +472 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/telemetryRedaction.d.ts +11 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/telemetryRedaction.js +44 -6
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/toolApprovalSignature.d.ts +232 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/toolApprovalSignature.js +360 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/types.d.ts +17 -1
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/types.js +12 -1
- package/dist/node_modules/@skrr-ai/auth-core/package.json +31 -1
- package/dist/node_modules/@skrr-ai/data-provider/index.js +25255 -18711
- package/docs/v1/operations.md +52 -0
- package/docs/v1/space-search.md +19 -0
- package/oclif.manifest.json +4843 -513
- package/package.json +32 -2
package/dist/lib/triggers.js
CHANGED
|
@@ -27,6 +27,7 @@ exports.assertKindFlagsApply = assertKindFlagsApply;
|
|
|
27
27
|
exports.assertModeRequiredFlags = assertModeRequiredFlags;
|
|
28
28
|
exports.describeScheduledFire = describeScheduledFire;
|
|
29
29
|
exports.fireWasAccepted = fireWasAccepted;
|
|
30
|
+
exports.describeStrictFireRefusal = describeStrictFireRefusal;
|
|
30
31
|
exports.describeFireDetail = describeFireDetail;
|
|
31
32
|
exports.formatFireInZone = formatFireInZone;
|
|
32
33
|
exports.nextFireLines = nextFireLines;
|
|
@@ -41,6 +42,7 @@ exports.onceDueAt = onceDueAt;
|
|
|
41
42
|
exports.nextRunLabel = nextRunLabel;
|
|
42
43
|
exports.armedLabel = armedLabel;
|
|
43
44
|
exports.degradedMarker = degradedMarker;
|
|
45
|
+
exports.sensorHealthLines = sensorHealthLines;
|
|
44
46
|
exports.renderTriggerList = renderTriggerList;
|
|
45
47
|
exports.formatDuplicateSubscriptionWarning = formatDuplicateSubscriptionWarning;
|
|
46
48
|
exports.armedStateLabel = armedStateLabel;
|
|
@@ -50,6 +52,7 @@ exports.renderTriggerSummary = renderTriggerSummary;
|
|
|
50
52
|
exports.renderLegacyRuns = renderLegacyRuns;
|
|
51
53
|
exports.renderFireAudit = renderFireAudit;
|
|
52
54
|
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
55
|
+
const node_fs_1 = require("node:fs");
|
|
53
56
|
const format_1 = require("./format");
|
|
54
57
|
exports.TRIGGER_KINDS = [
|
|
55
58
|
'schedule',
|
|
@@ -390,12 +393,28 @@ function parseJsonObject(raw, flagName) {
|
|
|
390
393
|
}
|
|
391
394
|
return parsed;
|
|
392
395
|
}
|
|
396
|
+
/**
|
|
397
|
+
* A JSON-array flag value: inline JSON, `@path` (a file), or a bare path to an existing file. A
|
|
398
|
+
* path used to reach `JSON.parse` and fail with "Unexpected token '/'" (OSK-15402).
|
|
399
|
+
*/
|
|
393
400
|
function parseJsonArray(raw, flagName) {
|
|
394
401
|
if (raw === undefined)
|
|
395
402
|
return undefined;
|
|
403
|
+
let text = raw;
|
|
404
|
+
const trimmed = raw.trim();
|
|
405
|
+
if (trimmed.startsWith('@') || (!/^[[{]/.test(trimmed) && (0, node_fs_1.existsSync)(trimmed))) {
|
|
406
|
+
const path = trimmed.startsWith('@') ? trimmed.slice(1) : trimmed;
|
|
407
|
+
try {
|
|
408
|
+
text = (0, node_fs_1.readFileSync)(path, 'utf8');
|
|
409
|
+
}
|
|
410
|
+
catch (err) {
|
|
411
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
412
|
+
throw new Error(`Cannot read ${flagName} file ${path}: ${msg}`);
|
|
413
|
+
}
|
|
414
|
+
}
|
|
396
415
|
let parsed;
|
|
397
416
|
try {
|
|
398
|
-
parsed = JSON.parse(
|
|
417
|
+
parsed = JSON.parse(text);
|
|
399
418
|
}
|
|
400
419
|
catch (err) {
|
|
401
420
|
const msg = err instanceof Error ? err.message : String(err);
|
|
@@ -443,6 +462,13 @@ function buildScheduleConfigFromFlags(flags) {
|
|
|
443
462
|
endAt: flags['end-at'],
|
|
444
463
|
staleCatchupMs: flags['stale-catchup-ms'],
|
|
445
464
|
});
|
|
465
|
+
// The range is the server's (`TRIGGER_STALE_CATCHUP_MS_RANGE`), checked here too so the refusal
|
|
466
|
+
// names the flag the person typed and happens before anything is sent (OSK-16474).
|
|
467
|
+
if (flags['stale-catchup-ms'] !== undefined) {
|
|
468
|
+
const refusal = (0, data_provider_1.describeStaleCatchupMsRefusal)(flags['stale-catchup-ms'], '--stale-catchup-ms');
|
|
469
|
+
if (refusal)
|
|
470
|
+
throw new Error(refusal);
|
|
471
|
+
}
|
|
446
472
|
return schedule;
|
|
447
473
|
}
|
|
448
474
|
function assertScheduleTimingShape(schedule, options = {}) {
|
|
@@ -840,6 +866,23 @@ function fireWasAccepted(result) {
|
|
|
840
866
|
typeof result.originalOutcome === 'string' &&
|
|
841
867
|
accepted.includes(result.originalOutcome));
|
|
842
868
|
}
|
|
869
|
+
/**
|
|
870
|
+
* Why `triggers fire --strict` failed. A strict failure used to print exactly what the exit-0 run
|
|
871
|
+
* printed and then exit 1, so nothing said what the flag had judged (OSK-16474). It names the
|
|
872
|
+
* outcome it refused, the reason, the server's sentence when there is one, and what --strict
|
|
873
|
+
* accepts.
|
|
874
|
+
*/
|
|
875
|
+
function describeStrictFireRefusal(result) {
|
|
876
|
+
const text = (value) => (typeof value === 'string' && value.trim() ? value.trim() : '');
|
|
877
|
+
const outcome = text(result.outcome) || 'unknown';
|
|
878
|
+
const original = outcome === 'duplicate' ? text(result.originalOutcome) : '';
|
|
879
|
+
const reason = text(result.reason);
|
|
880
|
+
const sentence = text(result.detail) || text(result.errorMessage);
|
|
881
|
+
return (`--strict: the fire was not accepted (outcome ${outcome}` +
|
|
882
|
+
`${original ? `, a repeat of ${original}` : ''}${reason ? `, reason ${reason}` : ''})` +
|
|
883
|
+
`${sentence ? `: ${sentence}` : '.'} ` +
|
|
884
|
+
`--strict accepts only ${data_provider_1.ACCEPTED_AGENT_TRIGGER_FIRE_OUTCOMES.join(', ')}, or a repeat of one.`);
|
|
885
|
+
}
|
|
843
886
|
/**
|
|
844
887
|
* The lines a fire or replay owes beyond `outcome=… reason=…` (OSK-15494): the sentence the
|
|
845
888
|
* server wrote ("Replayed fire … resolved a step that was not waiting when that fire ran:
|
|
@@ -1076,8 +1119,48 @@ function armedLabel(trigger) {
|
|
|
1076
1119
|
* Marked here so the list says it, not only `triggers show`.
|
|
1077
1120
|
*/
|
|
1078
1121
|
function degradedMarker(trigger) {
|
|
1079
|
-
const
|
|
1080
|
-
|
|
1122
|
+
const state = trigger.execution?.sensor?.state;
|
|
1123
|
+
// A sensor that stopped ITSELF reads `no` exactly like one its owner turned
|
|
1124
|
+
// off; only the stop reason tells them apart.
|
|
1125
|
+
if (trigger.enabled === false && state?.disabledReason)
|
|
1126
|
+
return ' (stopped)';
|
|
1127
|
+
if (state?.degradedReason)
|
|
1128
|
+
return ' (degraded)';
|
|
1129
|
+
if (state?.retryAfter && Date.parse(state.retryAfter) > Date.now())
|
|
1130
|
+
return ' (backing off)';
|
|
1131
|
+
return '';
|
|
1132
|
+
}
|
|
1133
|
+
/**
|
|
1134
|
+
* Feed health lines for `triggers show`: whether the sensor stopped itself and
|
|
1135
|
+
* why, whether it is backing off, and when the source was last read. A stop
|
|
1136
|
+
* the engine made used to be a field nothing printed, so a sensor that had
|
|
1137
|
+
* given up looked like one that was switched off.
|
|
1138
|
+
*/
|
|
1139
|
+
function sensorHealthLines(trigger, now = Date.now()) {
|
|
1140
|
+
const state = trigger.execution?.sensor?.state;
|
|
1141
|
+
if (!state)
|
|
1142
|
+
return [];
|
|
1143
|
+
const lines = [];
|
|
1144
|
+
if (state.disabledReason) {
|
|
1145
|
+
const why = data_provider_1.SENSOR_DISABLED_COPY[state.disabledReason] ?? state.disabledReason;
|
|
1146
|
+
const http = state.lastHttpStatus ? ` (HTTP ${state.lastHttpStatus})` : '';
|
|
1147
|
+
const when = state.disabledAt ? ` at ${state.disabledAt}` : '';
|
|
1148
|
+
if (trigger.enabled === false) {
|
|
1149
|
+
lines.push(`Stopped: ${state.disabledCode ?? 'observation_failed'}${http}${when} — ${why}; fix the cause, then \`skrr triggers enable ${trigger.id ?? '<id>'}\``);
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
if (trigger.enabled !== false && state.retryAfter && Date.parse(state.retryAfter) > now) {
|
|
1153
|
+
lines.push(`Backoff: next poll after ${state.retryAfter}${state.lastErrorCode ? ` (after ${state.lastErrorCode})` : ''}`);
|
|
1154
|
+
}
|
|
1155
|
+
if (state.lastSuccessAt)
|
|
1156
|
+
lines.push(`Last OK: ${state.lastSuccessAt}`);
|
|
1157
|
+
// `polls` counts successful reads, so 0 with an attempt on record is "never"
|
|
1158
|
+
// and not a row that predates `lastSuccessAt`.
|
|
1159
|
+
else if (state.lastCheckedAt && !state.polls)
|
|
1160
|
+
lines.push('Last OK: never (the source has not been read successfully)');
|
|
1161
|
+
if (state.lastChangeAt)
|
|
1162
|
+
lines.push(`Changed: ${state.lastChangeAt}`);
|
|
1163
|
+
return lines;
|
|
1081
1164
|
}
|
|
1082
1165
|
function renderTriggerList(triggers, log) {
|
|
1083
1166
|
if (triggers.length === 0) {
|
|
@@ -1099,12 +1182,18 @@ function renderTriggerList(triggers, log) {
|
|
|
1099
1182
|
{ key: 'next', header: 'NEXT/LAST', maxWidth: 24 },
|
|
1100
1183
|
{ key: 'label', header: 'LABEL', maxWidth: 32 },
|
|
1101
1184
|
], log);
|
|
1102
|
-
const degraded = triggers.filter((t) => degradedMarker(t));
|
|
1185
|
+
const degraded = triggers.filter((t) => degradedMarker(t) === ' (degraded)');
|
|
1103
1186
|
if (degraded.length > 0) {
|
|
1104
1187
|
log('');
|
|
1105
1188
|
log(`${degraded.length} trigger(s) are enabled but degraded — ` +
|
|
1106
1189
|
'see `Degraded:` in `triggers show <id>`.');
|
|
1107
1190
|
}
|
|
1191
|
+
const stopped = triggers.filter((t) => degradedMarker(t) === ' (stopped)');
|
|
1192
|
+
if (stopped.length > 0) {
|
|
1193
|
+
log('');
|
|
1194
|
+
log(`${stopped.length} sensor(s) stopped themselves — ` +
|
|
1195
|
+
'see `Stopped:` in `triggers show <id>`; fix the cause, then `triggers enable <id>`.');
|
|
1196
|
+
}
|
|
1108
1197
|
const unsynced = triggers.filter((t) => armedLabel(t).startsWith('!'));
|
|
1109
1198
|
if (unsynced.length > 0) {
|
|
1110
1199
|
log('');
|
|
@@ -1240,11 +1329,14 @@ function renderTriggerSummary(trigger, log, options = {}) {
|
|
|
1240
1329
|
if (st.itemFailurePolls)
|
|
1241
1330
|
log(`Items: failing for ${st.itemFailurePolls} poll(s) in a row`);
|
|
1242
1331
|
}
|
|
1332
|
+
if (sensor?.state)
|
|
1333
|
+
for (const line of sensorHealthLines(trigger))
|
|
1334
|
+
log(line);
|
|
1243
1335
|
// The sensor is degraded, not just carrying a line of text: say it first.
|
|
1244
1336
|
if (sensor?.state?.degradedReason)
|
|
1245
1337
|
log(`Degraded: ${sensor.state.degradedReason}`);
|
|
1246
1338
|
if (sensor?.state?.consecutiveErrors)
|
|
1247
|
-
log(`Errors: ${sensor.state.consecutiveErrors} feed failure(s) in a row (the sensor
|
|
1339
|
+
log(`Errors: ${sensor.state.consecutiveErrors} feed failure(s) in a row${sensor.state.lastErrorCode ? `, latest ${sensor.state.lastErrorCode}${sensor.state.lastHttpStatus ? ` (HTTP ${sensor.state.lastHttpStatus})` : ''}` : ''} (the sensor stops itself if the feed keeps failing)`);
|
|
1248
1340
|
if (sensor?.state?.lastError)
|
|
1249
1341
|
log(`Problem: ${sensor.state.lastError}`);
|
|
1250
1342
|
// An `external_work_task` writes into someone else's system, and which
|
|
@@ -29,6 +29,10 @@ export declare const USAGE_OVERVIEW_TOKEN_BUDGET = 240;
|
|
|
29
29
|
* grouping changes, and `skrr usage <folded>` resolves to the host page, which
|
|
30
30
|
* names the folded topic in an `Includes:` line so it stays reachable.
|
|
31
31
|
* `proposals` is the unified proposal inbox, so it reads as part of `inbox`.
|
|
32
|
+
* `apps` (author, install and approve an Agent App) is the packaged form of a widget: `skrr apps check` extends
|
|
33
|
+
* `skrr widgets check`, and the app runs in the same frame. Its own overview line took the first read from 240 to 241
|
|
34
|
+
* tokens, and this file's rule for that is to fold into a domain that already has the concept, not to raise the bound.
|
|
35
|
+
* `skrr usage apps` still resolves, to the `widgets` pages, which name it in `Includes:`.
|
|
32
36
|
*/
|
|
33
37
|
export declare const USAGE_DOMAIN_FOLDS: Readonly<Record<string, string>>;
|
|
34
38
|
export declare const USAGE_DOMAIN_TOKEN_BUDGET = 500;
|
|
@@ -40,8 +40,15 @@ exports.USAGE_OVERVIEW_TOKEN_BUDGET = 240;
|
|
|
40
40
|
* grouping changes, and `skrr usage <folded>` resolves to the host page, which
|
|
41
41
|
* names the folded topic in an `Includes:` line so it stays reachable.
|
|
42
42
|
* `proposals` is the unified proposal inbox, so it reads as part of `inbox`.
|
|
43
|
+
* `apps` (author, install and approve an Agent App) is the packaged form of a widget: `skrr apps check` extends
|
|
44
|
+
* `skrr widgets check`, and the app runs in the same frame. Its own overview line took the first read from 240 to 241
|
|
45
|
+
* tokens, and this file's rule for that is to fold into a domain that already has the concept, not to raise the bound.
|
|
46
|
+
* `skrr usage apps` still resolves, to the `widgets` pages, which name it in `Includes:`.
|
|
43
47
|
*/
|
|
44
|
-
exports.USAGE_DOMAIN_FOLDS = {
|
|
48
|
+
exports.USAGE_DOMAIN_FOLDS = {
|
|
49
|
+
proposals: 'inbox',
|
|
50
|
+
apps: 'widgets',
|
|
51
|
+
};
|
|
45
52
|
exports.USAGE_DOMAIN_TOKEN_BUDGET = 500;
|
|
46
53
|
const GENERIC_FLAGS = new Set(['bare', 'help', 'json', 'token', 'workspace']);
|
|
47
54
|
/**
|
|
@@ -98,13 +105,13 @@ function buildUsageReference(manifest, domainInput, options = {}) {
|
|
|
98
105
|
const bin = options.bin ?? 'skrr';
|
|
99
106
|
const entries = groupEntries(manifest).get(domain) ?? [];
|
|
100
107
|
const commands = entries.map((entry) => usageCommand(entry, bin));
|
|
101
|
-
const
|
|
108
|
+
const includes = foldedTopics(manifest, domain);
|
|
109
|
+
const pages = paginate(commands, domain, bin, includes);
|
|
102
110
|
const requested = options.page ?? 1;
|
|
103
111
|
const index = requested - 1;
|
|
104
112
|
if (!Number.isInteger(requested) || index < 0 || index >= pages.length)
|
|
105
113
|
return undefined;
|
|
106
114
|
const data = pages[index];
|
|
107
|
-
const includes = foldedTopics(manifest, domain);
|
|
108
115
|
const draft = {
|
|
109
116
|
object: 'sky_usage_reference',
|
|
110
117
|
generatedFrom: 'oclif.manifest.json',
|
|
@@ -229,7 +236,7 @@ function compact(value, maxCharacters) {
|
|
|
229
236
|
return normalized;
|
|
230
237
|
return `${normalized.slice(0, Math.max(0, maxCharacters - 1)).trimEnd()}…`;
|
|
231
238
|
}
|
|
232
|
-
function paginate(commands, domain, bin) {
|
|
239
|
+
function paginate(commands, domain, bin, includes) {
|
|
233
240
|
const pages = [];
|
|
234
241
|
let page = [];
|
|
235
242
|
for (const command of commands) {
|
|
@@ -241,6 +248,9 @@ function paginate(commands, domain, bin) {
|
|
|
241
248
|
object: 'sky_usage_reference',
|
|
242
249
|
generatedFrom: 'oclif.manifest.json',
|
|
243
250
|
domain,
|
|
251
|
+
// the `Includes:` line is part of every page's header, so it is part of what a page is measured against: a
|
|
252
|
+
// folded domain's pages were measured one line short, and a page could land one token over its budget
|
|
253
|
+
...(includes.length > 0 ? { includes } : {}),
|
|
244
254
|
tokenBudget: exports.USAGE_DOMAIN_TOKEN_BUDGET,
|
|
245
255
|
estimatedTokens: 0,
|
|
246
256
|
page: 999,
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { AppProjectionLoss } from '@skrr-ai/data-provider';
|
|
2
|
+
import type { AppsRefusal } from './apps';
|
|
3
|
+
/** Is this refusal code one of the projection's own (a widget that cannot be an app)? */
|
|
4
|
+
export declare function isProjectionRefusal(code: unknown): code is string;
|
|
5
|
+
/** The machine code `skrr` exits under for one of the projection's refusals. */
|
|
6
|
+
export declare function projectionRefusalCode(code: string): string;
|
|
7
|
+
/** One line saying what the app does not carry, for a loss the projection reported. */
|
|
8
|
+
export declare function describeProjectionLoss(loss: AppProjectionLoss): string;
|
|
9
|
+
/** The words for a widget that cannot be saved as an app, from what the server said. */
|
|
10
|
+
export declare function describeWidgetAppRefusal(refusal: AppsRefusal): string;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isProjectionRefusal = isProjectionRefusal;
|
|
4
|
+
exports.projectionRefusalCode = projectionRefusalCode;
|
|
5
|
+
exports.describeProjectionLoss = describeProjectionLoss;
|
|
6
|
+
exports.describeWidgetAppRefusal = describeWidgetAppRefusal;
|
|
7
|
+
/**
|
|
8
|
+
* `skrr widgets save-as-app`: the words a terminal needs around the call (decision D1, task p1-13).
|
|
9
|
+
*
|
|
10
|
+
* It builds no URL: the call is `dataService.saveAgentWidgetAsApp`, which is also what keeps this command
|
|
11
|
+
* reachable for `domain-api-parity.spec.ts`. The VOCABULARY is the contract's (`APP_PROJECTION_*`,
|
|
12
|
+
* `@skrr-ai/data-provider`): a reason arrives as a code and is turned into a sentence here, never declared
|
|
13
|
+
* a second time.
|
|
14
|
+
*/
|
|
15
|
+
const data_provider_1 = require("@skrr-ai/data-provider");
|
|
16
|
+
const LOSS_REASONS = new Set(data_provider_1.APP_PROJECTION_LOSS_REASONS);
|
|
17
|
+
const REFUSALS = new Set(data_provider_1.APP_PROJECTION_REFUSALS);
|
|
18
|
+
/** Is this refusal code one of the projection's own (a widget that cannot be an app)? */
|
|
19
|
+
function isProjectionRefusal(code) {
|
|
20
|
+
return typeof code === 'string' && REFUSALS.has(code);
|
|
21
|
+
}
|
|
22
|
+
/** The machine code `skrr` exits under for one of the projection's refusals. */
|
|
23
|
+
function projectionRefusalCode(code) {
|
|
24
|
+
return `WIDGET_${code.toUpperCase()}`;
|
|
25
|
+
}
|
|
26
|
+
const LOSS_WORDS = {
|
|
27
|
+
truncated: (loss) => `${loss.field} was cut to fit the app manifest${loss.detail ? ` (it was ${loss.detail} characters)` : ''}.`,
|
|
28
|
+
forced_private: (loss) => `${loss.field}${loss.detail ? ` "${loss.detail}"` : ''} is not carried: an app draft is private to you.`,
|
|
29
|
+
not_carried: (loss) => `${loss.field}${loss.detail ? ` (${loss.detail})` : ''} stays with the widget: an app has no such setting.`,
|
|
30
|
+
never_honoured: (loss) => `${loss.field} was a switch nothing ever read, so the app does not promise it. If the app needs data, declare capabilities.store or capabilities.query in app.json.`,
|
|
31
|
+
network_not_carried: (loss) => `${loss.field}${loss.detail ? ` (${loss.detail})` : ''} is not carried: an app's frame has no network of its own. Declare capabilities.http.origins in app.json; whoever installs the app grants it.`,
|
|
32
|
+
};
|
|
33
|
+
/** One line saying what the app does not carry, for a loss the projection reported. */
|
|
34
|
+
function describeProjectionLoss(loss) {
|
|
35
|
+
if (!LOSS_REASONS.has(loss.reason)) {
|
|
36
|
+
return `${loss.field}: not carried (${loss.reason})`;
|
|
37
|
+
}
|
|
38
|
+
return LOSS_WORDS[loss.reason](loss);
|
|
39
|
+
}
|
|
40
|
+
/** The words for a widget that cannot be saved as an app, from what the server said. */
|
|
41
|
+
function describeWidgetAppRefusal(refusal) {
|
|
42
|
+
const lines = [refusal.message || refusal.error || 'refused'];
|
|
43
|
+
if (refusal.error === 'unsupported_type') {
|
|
44
|
+
lines.push('A react or mermaid widget keeps working as a widget. To make it an app, write it as html (`skrr apps create`, then `skrr apps file write`).');
|
|
45
|
+
}
|
|
46
|
+
return lines.join('\n');
|
|
47
|
+
}
|
|
@@ -454,7 +454,10 @@ const JS_RULES = [
|
|
|
454
454
|
severity: 'warn',
|
|
455
455
|
code: 'host-access',
|
|
456
456
|
message: 'top. or parent. as a bare name: if this is the browsing context, it is cross-origin and throws; ignore if it is your own variable.',
|
|
457
|
-
|
|
457
|
+
// This pattern matches a local variable called `top` as readily as the browsing context, so the fix has to be
|
|
458
|
+
// right for BOTH: rename the variable, or (if the page that hosts the frame was meant) use the bridge. A fix that
|
|
459
|
+
// spoke only of `window.skrr` read as nonsense beside a harmless `const top = el` (experiment Y2).
|
|
460
|
+
fix: 'If top (or parent) is your own variable, rename it and this finding goes away. If you meant the page that hosts the frame, the sandbox does not allow that: use window.skrr (requestPrompt, openLink, navigate) to talk to the app.',
|
|
458
461
|
},
|
|
459
462
|
{
|
|
460
463
|
pattern: /\b(?:window|self|globalThis)\s*\.\s*open\s*\(/g,
|
|
@@ -502,8 +505,27 @@ const STRING_ARGUMENT_RULES = [
|
|
|
502
505
|
fix: 'Use inline SVG, canvas, or a data: URI.',
|
|
503
506
|
},
|
|
504
507
|
];
|
|
508
|
+
/** Broker calls send a capability message; they never use the frame's network API. */
|
|
509
|
+
function brokerFetchOffsets(code) {
|
|
510
|
+
const offsets = new Set();
|
|
511
|
+
const calls = /\b(?:window\s*\.\s*)?skrr\s*\.\s*app\s*\.\s*(?:http|service)\s*\.\s*fetch\s*\(/g;
|
|
512
|
+
for (const match of code.matchAll(calls)) {
|
|
513
|
+
const start = match.index ?? 0;
|
|
514
|
+
if (start > 0 && isIdentChar(code[start - 1]))
|
|
515
|
+
continue;
|
|
516
|
+
// `other . skrr.app.http.fetch` is another object's property, not the host SDK.
|
|
517
|
+
let before = start - 1;
|
|
518
|
+
while (before >= 0 && /\s/.test(code[before]))
|
|
519
|
+
before -= 1;
|
|
520
|
+
if (before >= 0 && code[before] === '.')
|
|
521
|
+
continue;
|
|
522
|
+
offsets.add(start + match[0].lastIndexOf('fetch'));
|
|
523
|
+
}
|
|
524
|
+
return offsets;
|
|
525
|
+
}
|
|
505
526
|
function scanJsInto(source, baseLine, out) {
|
|
506
527
|
const { code, commentless, literals } = lexJs(source);
|
|
528
|
+
const brokerFetches = brokerFetchOffsets(code);
|
|
507
529
|
const starts = lineStarts(source);
|
|
508
530
|
const lineOf = (index) => baseLine + lineAt(starts, index) - 1;
|
|
509
531
|
const codeLines = code.split('\n');
|
|
@@ -513,6 +535,8 @@ function scanJsInto(source, baseLine, out) {
|
|
|
513
535
|
// string, a template's text or a regular expression is not a call.
|
|
514
536
|
for (const rule of JS_RULES) {
|
|
515
537
|
for (const match of code.matchAll(rule.pattern)) {
|
|
538
|
+
if (rule.code === 'network-api' && brokerFetches.has(match.index ?? 0))
|
|
539
|
+
continue;
|
|
516
540
|
out.add(rule.severity, rule.code, lineOf(match.index ?? 0), rule.message, rule.fix);
|
|
517
541
|
}
|
|
518
542
|
}
|
|
@@ -53,6 +53,11 @@ function describeNodeDetail(node, attention = '') {
|
|
|
53
53
|
parts.push(attention);
|
|
54
54
|
if (wait)
|
|
55
55
|
parts.push(wait.text);
|
|
56
|
+
// A cancelled node says why it stopped (the run's deadline, a person's stop), not the
|
|
57
|
+
// problem it had been parked on before (OSK-16473).
|
|
58
|
+
const stopped = node.status === 'cancelled' ? node.stoppedBecause?.message : undefined;
|
|
59
|
+
if (typeof stopped === 'string' && stopped)
|
|
60
|
+
parts.push(`stopped: ${stopped}`);
|
|
56
61
|
const loop = describeLoopProgress(node);
|
|
57
62
|
if (loop)
|
|
58
63
|
parts.push(loop);
|
package/dist/lib/workspaces.d.ts
CHANGED
|
@@ -35,6 +35,8 @@ export interface WorkspaceStewardshipReport extends WorkspaceGrantReport {
|
|
|
35
35
|
membership: {
|
|
36
36
|
status: 'active' | 'absent' | 'unavailable';
|
|
37
37
|
role?: string;
|
|
38
|
+
/** `false` on `absent`: a removed member and an id that never existed read alike. */
|
|
39
|
+
canDistinguishRemoved?: boolean;
|
|
38
40
|
};
|
|
39
41
|
commitments: StewardshipCommitmentMetadata[] | null;
|
|
40
42
|
approverSeats: StewardshipCommitmentMetadata[] | null;
|
|
@@ -44,19 +46,40 @@ export interface WorkspaceStewardshipReport extends WorkspaceGrantReport {
|
|
|
44
46
|
}> | null;
|
|
45
47
|
}
|
|
46
48
|
export declare function getWorkspaceStewardship(workspaceId: string, memberUserId: string): Promise<WorkspaceStewardshipReport>;
|
|
47
|
-
/**
|
|
49
|
+
/**
|
|
50
|
+
* One current member as `skrr workspaces members` shows it, in its table and in
|
|
51
|
+
* `--json` alike (OSK-16472). Only these fields: the endpoint's raw row also carries
|
|
52
|
+
* the membership `_id`, monthly usage counters the web billing tab reads, and the
|
|
53
|
+
* user's avatar, none of which a default members listing promises. Image transport
|
|
54
|
+
* may be explicitly expanded with --include-images; usage and storage metadata never are.
|
|
55
|
+
*/
|
|
48
56
|
export interface WorkspaceMemberRow {
|
|
49
57
|
userId: string;
|
|
50
|
-
|
|
51
|
-
|
|
58
|
+
name: string | null;
|
|
59
|
+
email: string | null;
|
|
60
|
+
role: string | null;
|
|
61
|
+
joinedAt: string | null;
|
|
62
|
+
/** Present only when image transport was explicitly requested. */
|
|
63
|
+
avatar?: string;
|
|
64
|
+
}
|
|
65
|
+
interface RawWorkspaceMember {
|
|
66
|
+
userId?: unknown;
|
|
67
|
+
role?: unknown;
|
|
68
|
+
joinedAt?: unknown;
|
|
52
69
|
user?: {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
};
|
|
70
|
+
name?: unknown;
|
|
71
|
+
username?: unknown;
|
|
72
|
+
email?: unknown;
|
|
73
|
+
avatar?: unknown;
|
|
74
|
+
} | null;
|
|
58
75
|
}
|
|
59
|
-
|
|
76
|
+
/** The ONE projection of a raw members row; nothing else of it reaches output. */
|
|
77
|
+
export declare function toWorkspaceMemberRow(raw: RawWorkspaceMember, options?: {
|
|
78
|
+
includeImages?: boolean;
|
|
79
|
+
}): WorkspaceMemberRow;
|
|
80
|
+
export declare function listWorkspaceMembers(workspaceId: string, options?: {
|
|
81
|
+
includeImages?: boolean;
|
|
82
|
+
}): Promise<WorkspaceMemberRow[]>;
|
|
60
83
|
/** A user id as the stewardship route takes it: a 24-hex ObjectId. */
|
|
61
84
|
export declare const USER_ID_PATTERN: RegExp;
|
|
62
85
|
export declare class MemberReferenceError extends Error {
|
|
@@ -226,3 +249,4 @@ export declare function getWorkspace(workspaceId: string): Promise<WorkspaceRow>
|
|
|
226
249
|
* session history to the wrong team.
|
|
227
250
|
*/
|
|
228
251
|
export declare function matchWorkspace(rows: WorkspaceRow[], ref: string): WorkspaceRow[];
|
|
252
|
+
export {};
|
package/dist/lib/workspaces.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MemberReferenceError = exports.USER_ID_PATTERN = void 0;
|
|
4
4
|
exports.getWorkspaceStewardship = getWorkspaceStewardship;
|
|
5
|
+
exports.toWorkspaceMemberRow = toWorkspaceMemberRow;
|
|
5
6
|
exports.listWorkspaceMembers = listWorkspaceMembers;
|
|
6
7
|
exports.resolveMemberUserId = resolveMemberUserId;
|
|
7
8
|
exports.listWorkspaceGrants = listWorkspaceGrants;
|
|
@@ -13,14 +14,29 @@ exports.listWorkspaceListing = listWorkspaceListing;
|
|
|
13
14
|
exports.listWorkspaceAgentAudit = listWorkspaceAgentAudit;
|
|
14
15
|
exports.getWorkspace = getWorkspace;
|
|
15
16
|
exports.matchWorkspace = matchWorkspace;
|
|
17
|
+
const member_output_1 = require("./member-output");
|
|
16
18
|
const api_fetch_1 = require("./api-fetch");
|
|
17
19
|
const triggers_1 = require("./triggers");
|
|
18
20
|
async function getWorkspaceStewardship(workspaceId, memberUserId) {
|
|
19
21
|
return (0, api_fetch_1.apiFetch)(`/api/workspaces/${encodeURIComponent(workspaceId)}/stewardship/members/${encodeURIComponent(memberUserId)}`);
|
|
20
22
|
}
|
|
21
|
-
|
|
23
|
+
const text = (value) => (typeof value === 'string' && value ? value : null);
|
|
24
|
+
/** The ONE projection of a raw members row; nothing else of it reaches output. */
|
|
25
|
+
function toWorkspaceMemberRow(raw, options = {}) {
|
|
26
|
+
return {
|
|
27
|
+
userId: String(raw.userId ?? ''),
|
|
28
|
+
name: text(raw.user?.name) ?? text(raw.user?.username),
|
|
29
|
+
email: text(raw.user?.email),
|
|
30
|
+
role: text(raw.role),
|
|
31
|
+
joinedAt: text(raw.joinedAt),
|
|
32
|
+
...(0, member_output_1.memberAvatar)(raw.user, options.includeImages),
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
async function listWorkspaceMembers(workspaceId, options = {}) {
|
|
22
36
|
const response = await (0, api_fetch_1.apiFetch)(`/api/workspaces/${encodeURIComponent(workspaceId)}/members`);
|
|
23
|
-
return Array.isArray(response?.data)
|
|
37
|
+
return Array.isArray(response?.data)
|
|
38
|
+
? response.data.map((row) => toWorkspaceMemberRow(row, options))
|
|
39
|
+
: [];
|
|
24
40
|
}
|
|
25
41
|
/** A user id as the stewardship route takes it: a 24-hex ObjectId. */
|
|
26
42
|
exports.USER_ID_PATTERN = /^[a-f0-9]{24}$/i;
|
|
@@ -51,7 +67,7 @@ async function resolveMemberUserId(workspaceId, reference, list = listWorkspaceM
|
|
|
51
67
|
throw new MemberReferenceError(`"${reference}" is not a user id or an email. A user id is 24 hexadecimal characters. ${listHint}`);
|
|
52
68
|
}
|
|
53
69
|
const email = value.toLowerCase();
|
|
54
|
-
const matches = (await list(workspaceId)).filter((member) => member.
|
|
70
|
+
const matches = (await list(workspaceId)).filter((member) => member.email?.toLowerCase() === email);
|
|
55
71
|
if (matches.length === 1)
|
|
56
72
|
return String(matches[0].userId);
|
|
57
73
|
throw new MemberReferenceError(matches.length === 0
|
|
@@ -108,6 +108,8 @@ export declare const COMPUTER_EVENTS: {
|
|
|
108
108
|
* them. Needs `computer_browser_file_chooser_v1`.
|
|
109
109
|
*/
|
|
110
110
|
readonly fileChooser: "computer:surface:filechooser";
|
|
111
|
+
/** Deliberate semantic teaching in the browser controlled by this attachment. */
|
|
112
|
+
readonly teaching: "computer:surface:teaching";
|
|
111
113
|
};
|
|
112
114
|
/**
|
|
113
115
|
* API ⇄ daemon. The daemon transports (Socket.IO and SSE) carry no
|
|
@@ -135,6 +137,7 @@ export declare const DAEMON_COMPUTER_EVENTS: {
|
|
|
135
137
|
readonly dialog: "daemon:computer:surface:dialog";
|
|
136
138
|
readonly copy: "daemon:computer:surface:copy";
|
|
137
139
|
readonly fileChooser: "daemon:computer:surface:filechooser";
|
|
140
|
+
readonly teaching: "daemon:computer:surface:teaching";
|
|
138
141
|
/**
|
|
139
142
|
* Pin or unpin the surface an open human-input request names (§8): a pinned
|
|
140
143
|
* surface is not reclaimed by idle or wall-clock expiry. Fire-and-forget,
|
|
@@ -244,6 +247,9 @@ export declare const COMPUTER_CAPABILITIES: {
|
|
|
244
247
|
* them (headless refuses them), so no surface may claim to show one.
|
|
245
248
|
*/
|
|
246
249
|
readonly browserPage: "computer_browser_page_v1";
|
|
250
|
+
readonly browserTeaching: "computer_browser_teaching_v1";
|
|
251
|
+
/** Separately consented, origin-filtered semantic activity review. */
|
|
252
|
+
readonly browserActivityReview: "computer_browser_activity_review_v1";
|
|
247
253
|
/** Sharing a person's own surface with an agent session (§5.4). */
|
|
248
254
|
readonly surfaceShare: "computer_surface_share_v1";
|
|
249
255
|
/** Pinning a surface an open human-input request names: `daemon:computer:surface:pin` (§8). */
|
|
@@ -1036,7 +1042,7 @@ export declare function computerDeclaredServiceSpec(raw: unknown): {
|
|
|
1036
1042
|
* caller can never be handed an address off the machine.
|
|
1037
1043
|
*/
|
|
1038
1044
|
export declare function computerDeclaredServiceUrl(service: Pick<ComputerDeclaredServiceSpec, 'port'> & Partial<Pick<ComputerDeclaredServiceSpec, 'path' | 'protocol'>>): string;
|
|
1039
|
-
export declare const COMPUTER_MACHINE_KINDS: readonly ["dedicated", "personal"];
|
|
1045
|
+
export declare const COMPUTER_MACHINE_KINDS: readonly ["dedicated", "personal", "space"];
|
|
1040
1046
|
export type ComputerMachineKind = (typeof COMPUTER_MACHINE_KINDS)[number];
|
|
1041
1047
|
/**
|
|
1042
1048
|
* One picture per machine state; none of them is a spinner without a bound,
|
|
@@ -1148,3 +1154,10 @@ export interface ComputerDaemonLogResult {
|
|
|
1148
1154
|
/** Lines the redaction rewrote anywhere in the ring (a count, never content). */
|
|
1149
1155
|
redactedLines: number;
|
|
1150
1156
|
}
|
|
1157
|
+
/** Exact origins only: neither URL paths nor credentials broaden consent. */
|
|
1158
|
+
export interface BrowserActivityOriginPolicy {
|
|
1159
|
+
allowOrigins: string[];
|
|
1160
|
+
excludeOrigins: string[];
|
|
1161
|
+
}
|
|
1162
|
+
export declare function normalizeBrowserActivityOriginPolicy(input: unknown): BrowserActivityOriginPolicy;
|
|
1163
|
+
export declare function browserActivityOriginAllowed(policy: BrowserActivityOriginPolicy, url: unknown): boolean;
|
|
@@ -44,6 +44,8 @@ exports.computerDeclaredServiceUrl = computerDeclaredServiceUrl;
|
|
|
44
44
|
exports.computerPowerPhaseForLeaseState = computerPowerPhaseForLeaseState;
|
|
45
45
|
exports.computerShowsDesktop = computerShowsDesktop;
|
|
46
46
|
exports.computerOffersPowerActions = computerOffersPowerActions;
|
|
47
|
+
exports.normalizeBrowserActivityOriginPolicy = normalizeBrowserActivityOriginPolicy;
|
|
48
|
+
exports.browserActivityOriginAllowed = browserActivityOriginAllowed;
|
|
47
49
|
// ---------------------------------------------------------------------------
|
|
48
50
|
// Events (§7.1)
|
|
49
51
|
// ---------------------------------------------------------------------------
|
|
@@ -132,6 +134,8 @@ exports.COMPUTER_EVENTS = {
|
|
|
132
134
|
* them. Needs `computer_browser_file_chooser_v1`.
|
|
133
135
|
*/
|
|
134
136
|
fileChooser: 'computer:surface:filechooser',
|
|
137
|
+
/** Deliberate semantic teaching in the browser controlled by this attachment. */
|
|
138
|
+
teaching: 'computer:surface:teaching',
|
|
135
139
|
};
|
|
136
140
|
/**
|
|
137
141
|
* API ⇄ daemon. The daemon transports (Socket.IO and SSE) carry no
|
|
@@ -160,6 +164,7 @@ exports.DAEMON_COMPUTER_EVENTS = {
|
|
|
160
164
|
dialog: 'daemon:computer:surface:dialog',
|
|
161
165
|
copy: 'daemon:computer:surface:copy',
|
|
162
166
|
fileChooser: 'daemon:computer:surface:filechooser',
|
|
167
|
+
teaching: 'daemon:computer:surface:teaching',
|
|
163
168
|
/**
|
|
164
169
|
* Pin or unpin the surface an open human-input request names (§8): a pinned
|
|
165
170
|
* surface is not reclaimed by idle or wall-clock expiry. Fire-and-forget,
|
|
@@ -285,6 +290,9 @@ exports.COMPUTER_CAPABILITIES = {
|
|
|
285
290
|
* them (headless refuses them), so no surface may claim to show one.
|
|
286
291
|
*/
|
|
287
292
|
browserPage: 'computer_browser_page_v1',
|
|
293
|
+
browserTeaching: 'computer_browser_teaching_v1',
|
|
294
|
+
/** Separately consented, origin-filtered semantic activity review. */
|
|
295
|
+
browserActivityReview: 'computer_browser_activity_review_v1',
|
|
288
296
|
/** Sharing a person's own surface with an agent session (§5.4). */
|
|
289
297
|
surfaceShare: 'computer_surface_share_v1',
|
|
290
298
|
/** Pinning a surface an open human-input request names: `daemon:computer:surface:pin` (§8). */
|
|
@@ -1132,7 +1140,7 @@ function computerDeclaredServiceUrl(service) {
|
|
|
1132
1140
|
// ---------------------------------------------------------------------------
|
|
1133
1141
|
// Machines and power (§10, §18)
|
|
1134
1142
|
// ---------------------------------------------------------------------------
|
|
1135
|
-
exports.COMPUTER_MACHINE_KINDS = ['dedicated', 'personal'];
|
|
1143
|
+
exports.COMPUTER_MACHINE_KINDS = ['dedicated', 'personal', 'space'];
|
|
1136
1144
|
/**
|
|
1137
1145
|
* One picture per machine state; none of them is a spinner without a bound,
|
|
1138
1146
|
* and none collapses two states into the reassuring one.
|
|
@@ -1233,7 +1241,7 @@ function computerShowsDesktop(phase) {
|
|
|
1233
1241
|
}
|
|
1234
1242
|
/** Power actions are offered for a Dedicated Runtime only; a personal machine has none (§18). */
|
|
1235
1243
|
function computerOffersPowerActions(machineKind) {
|
|
1236
|
-
return machineKind === 'dedicated';
|
|
1244
|
+
return machineKind === 'dedicated' || machineKind === 'space';
|
|
1237
1245
|
}
|
|
1238
1246
|
// ---------------------------------------------------------------------------
|
|
1239
1247
|
// The daemon's own log (`computer_daemon_log_v1`)
|
|
@@ -1264,3 +1272,40 @@ exports.COMPUTER_DAEMON_LOG_LIMITS = {
|
|
|
1264
1272
|
rateMax: 30,
|
|
1265
1273
|
rateWindowMs: 60 * 1000,
|
|
1266
1274
|
};
|
|
1275
|
+
function normalizeBrowserActivityOriginPolicy(input) {
|
|
1276
|
+
if (!input || typeof input !== 'object' || Array.isArray(input))
|
|
1277
|
+
throw new Error('Choose exact allowed and excluded web origins');
|
|
1278
|
+
const value = input;
|
|
1279
|
+
if (Object.keys(value).some((key) => !['allowOrigins', 'excludeOrigins'].includes(key)))
|
|
1280
|
+
throw new Error('Unsupported source filter');
|
|
1281
|
+
const origins = (items, required) => {
|
|
1282
|
+
if (!Array.isArray(items) || items.length > 20 || (required && !items.length))
|
|
1283
|
+
throw new Error('Choose from one to twenty allowed origins and up to twenty excluded origins');
|
|
1284
|
+
return [...new Set(items.map((item) => {
|
|
1285
|
+
if (typeof item !== 'string' || item.length > 500)
|
|
1286
|
+
throw new Error('Use an exact http or https origin without a path, credentials, query or fragment');
|
|
1287
|
+
let url;
|
|
1288
|
+
try {
|
|
1289
|
+
url = new URL(item);
|
|
1290
|
+
}
|
|
1291
|
+
catch {
|
|
1292
|
+
throw new Error('Use an exact http or https origin');
|
|
1293
|
+
}
|
|
1294
|
+
if (!['http:', 'https:'].includes(url.protocol) || url.hostname.includes('*') || url.username || url.password || item !== url.origin)
|
|
1295
|
+
throw new Error('Use an exact http or https origin without a path, credentials, query or fragment');
|
|
1296
|
+
return url.origin;
|
|
1297
|
+
}))].sort();
|
|
1298
|
+
};
|
|
1299
|
+
return { allowOrigins: origins(value.allowOrigins, true), excludeOrigins: origins(value.excludeOrigins, false) };
|
|
1300
|
+
}
|
|
1301
|
+
function browserActivityOriginAllowed(policy, url) {
|
|
1302
|
+
if (typeof url !== 'string')
|
|
1303
|
+
return false;
|
|
1304
|
+
try {
|
|
1305
|
+
const origin = new URL(url).origin;
|
|
1306
|
+
return ['http:', 'https:'].includes(new URL(url).protocol) && policy.allowOrigins.includes(origin) && !policy.excludeOrigins.includes(origin);
|
|
1307
|
+
}
|
|
1308
|
+
catch {
|
|
1309
|
+
return false;
|
|
1310
|
+
}
|
|
1311
|
+
}
|