@skrr-ai/cli 0.1.215 → 0.1.217
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/commands/agent/message/no-reply.d.ts +4 -0
- package/dist/commands/agent/message/no-reply.js +5 -1
- package/dist/commands/agents/always-on/recovery-review.d.ts +12 -0
- package/dist/commands/agents/always-on/recovery-review.js +52 -2
- package/dist/commands/agents/permissions/list.d.ts +12 -0
- package/dist/commands/agents/permissions/list.js +42 -0
- package/dist/commands/agents/permissions/remove.d.ts +15 -0
- package/dist/commands/agents/permissions/remove.js +68 -0
- package/dist/commands/dm/work.js +2 -0
- package/dist/commands/duties/action-proposal.js +7 -1
- package/dist/commands/duties/action-proposals.d.ts +9 -0
- package/dist/commands/duties/action-proposals.js +30 -12
- package/dist/commands/duties/check-now.d.ts +7 -0
- package/dist/commands/duties/check-now.js +36 -1
- package/dist/commands/duties/create.d.ts +15 -0
- package/dist/commands/duties/create.js +93 -5
- package/dist/commands/duties/pause.js +20 -2
- package/dist/commands/duties/trigger-status.js +6 -1
- package/dist/commands/duties/update.js +22 -7
- package/dist/commands/spaces/auto-executor/preview.d.ts +7 -0
- package/dist/commands/spaces/auto-executor/preview.js +21 -2
- package/dist/commands/tasks/chat/index.d.ts +11 -0
- package/dist/commands/tasks/chat/index.js +27 -0
- package/dist/commands/tasks/input/answer.d.ts +12 -0
- package/dist/commands/tasks/input/answer.js +59 -5
- package/dist/commands/tasks/operations/show.js +5 -6
- package/dist/commands/tasks/result/show.js +2 -4
- package/dist/commands/tasks/retry-receipt.js +1 -3
- package/dist/commands/wiki/write.js +7 -2
- package/dist/generated/agent-guides.json +24 -24
- package/dist/lib/compasses.d.ts +5 -0
- package/dist/lib/compasses.js +6 -1
- package/dist/lib/duties.d.ts +29 -0
- package/dist/lib/duties.js +122 -16
- package/dist/lib/permission-rules.d.ts +21 -0
- package/dist/lib/permission-rules.js +75 -0
- package/dist/lib/space-proposals.js +8 -1
- package/dist/lib/space-write-policy.js +18 -2
- package/dist/lib/task-extras.d.ts +19 -0
- package/dist/lib/task-extras.js +13 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/ownerChatDutyHarnesses.d.ts +43 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/ownerChatDutyHarnesses.js +36 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/ownerChatDutyHarnesses.d.ts +43 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/ownerChatDutyHarnesses.js +48 -0
- package/dist/node_modules/@skrr-ai/auth-core/package.json +10 -0
- package/dist/node_modules/@skrr-ai/data-provider/index.js +12658 -12041
- package/oclif.manifest.json +201 -4
- package/package.json +5 -2
|
@@ -44,12 +44,13 @@ function writePolicyLines(view) {
|
|
|
44
44
|
if (row.capped)
|
|
45
45
|
notes.push(`the Workspace requires approval for ${row.writeClass}, so stored "auto" reads as propose`);
|
|
46
46
|
// A class with no proposal path yet refuses what it would hold (OSK-17994);
|
|
47
|
-
// a page class holds
|
|
47
|
+
// a page class holds a body write as a suggestion on the page (OSK-17997)
|
|
48
|
+
// and a new page as a proposal to create it (OSK-33418).
|
|
48
49
|
// `proposalPath` is absent from a server older than the field.
|
|
49
50
|
if (row.mode === 'propose' && row.proposalPath === null)
|
|
50
51
|
notes.push('cannot be proposed yet, so an unattended write is refused');
|
|
51
52
|
if (row.mode === 'propose' && row.proposalPath === 'page_suggestion')
|
|
52
|
-
notes.push('a body edit becomes a suggestion
|
|
53
|
+
notes.push('a body edit or a new page becomes a suggestion a person accepts; other page changes are refused');
|
|
53
54
|
// OSK-17998: a new skill is proposed as a lesson; nothing else about skills can be.
|
|
54
55
|
if (row.mode === 'propose' && row.proposalPath === 'space_lesson')
|
|
55
56
|
notes.push('a new skill is proposed as a lesson a person promotes; a removal or pin is refused');
|
|
@@ -68,6 +69,21 @@ function writePolicyLines(view) {
|
|
|
68
69
|
*/
|
|
69
70
|
function spaceWritePendingLines(body, { binName }) {
|
|
70
71
|
const proposal = body.proposal;
|
|
72
|
+
if (proposal.kind === 'page_suggestion' && proposal.create) {
|
|
73
|
+
// A proposal to create a page (OSK-33418): no page exists and nothing
|
|
74
|
+
// holds the path until a person accepts it.
|
|
75
|
+
const lines = [
|
|
76
|
+
'Held for approval: no page was created yet.',
|
|
77
|
+
body.message,
|
|
78
|
+
`Proposed page: "${proposal.create.title}" at ${proposal.create.path} (suggestion ${proposal.id})`,
|
|
79
|
+
];
|
|
80
|
+
if (proposal.duplicate)
|
|
81
|
+
lines.push('The same proposal was already pending; it was not made twice.');
|
|
82
|
+
if (proposal.spaceId) {
|
|
83
|
+
lines.push(`Review it: ${binName} spaces proposals list ${proposal.spaceId} --kind page_suggestion`);
|
|
84
|
+
}
|
|
85
|
+
return lines;
|
|
86
|
+
}
|
|
71
87
|
if (proposal.kind === 'page_suggestion') {
|
|
72
88
|
// A page revision proposal (OSK-17997): a suggestion thread on the page,
|
|
73
89
|
// decided from the Space inbox or on the page itself.
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { TaskResultRecord } from '@skrr-ai/data-provider';
|
|
1
2
|
import { withQuery } from './triggers';
|
|
2
3
|
type Query = Parameters<typeof withQuery>[1];
|
|
3
4
|
type Json = Record<string, unknown>;
|
|
@@ -161,4 +162,22 @@ export interface TaskLabelSuggestionResponse {
|
|
|
161
162
|
suggestions?: TaskLabelSuggestion[];
|
|
162
163
|
}
|
|
163
164
|
export declare function taskLabelSuggestion(taskId: string): Promise<TaskLabelSuggestionResponse>;
|
|
165
|
+
/**
|
|
166
|
+
* The one Space evidence scope an exact Result read may name. The route refuses
|
|
167
|
+
* both at once, and a bound Space review or Notebook session must name its own.
|
|
168
|
+
*/
|
|
169
|
+
export type ExactTaskResultScope = {
|
|
170
|
+
reviewSpaceId?: string;
|
|
171
|
+
notebookSpaceId?: string;
|
|
172
|
+
};
|
|
173
|
+
/**
|
|
174
|
+
* `GET /api/tasks/:taskId/results/:resultId` — one immutable Result version, read
|
|
175
|
+
* by id (`skrr tasks result show --result <id>`, OSK-32828).
|
|
176
|
+
*
|
|
177
|
+
* Through the shared fetch rather than `request.get`: a native Space review
|
|
178
|
+
* session proves itself with the runtime headers that fetch attaches, and only
|
|
179
|
+
* for this exact path and its single `reviewSpaceId` (lib/task-runtime-headers.ts).
|
|
180
|
+
* Kept in the lib so `domain-api-parity` sees the endpoint.
|
|
181
|
+
*/
|
|
182
|
+
export declare function readExactTaskResult(taskId: string, resultId: string, scope?: ExactTaskResultScope): Promise<TaskResultRecord>;
|
|
164
183
|
export {};
|
package/dist/lib/task-extras.js
CHANGED
|
@@ -7,6 +7,7 @@ exports.taskRunFork = taskRunFork;
|
|
|
7
7
|
exports.taskRunPromote = taskRunPromote;
|
|
8
8
|
exports.parseExecutionTargetRef = parseExecutionTargetRef;
|
|
9
9
|
exports.taskLabelSuggestion = taskLabelSuggestion;
|
|
10
|
+
exports.readExactTaskResult = readExactTaskResult;
|
|
10
11
|
/**
|
|
11
12
|
* task-extras.ts — the `/api/tasks` endpoints that have no `dataService.*`
|
|
12
13
|
* wrapper, gathered so every one of them is reachable from `skrr`.
|
|
@@ -198,3 +199,15 @@ function taskLabelSuggestion(taskId) {
|
|
|
198
199
|
method: 'POST',
|
|
199
200
|
});
|
|
200
201
|
}
|
|
202
|
+
/**
|
|
203
|
+
* `GET /api/tasks/:taskId/results/:resultId` — one immutable Result version, read
|
|
204
|
+
* by id (`skrr tasks result show --result <id>`, OSK-32828).
|
|
205
|
+
*
|
|
206
|
+
* Through the shared fetch rather than `request.get`: a native Space review
|
|
207
|
+
* session proves itself with the runtime headers that fetch attaches, and only
|
|
208
|
+
* for this exact path and its single `reviewSpaceId` (lib/task-runtime-headers.ts).
|
|
209
|
+
* Kept in the lib so `domain-api-parity` sees the endpoint.
|
|
210
|
+
*/
|
|
211
|
+
function readExactTaskResult(taskId, resultId, scope = {}) {
|
|
212
|
+
return (0, api_fetch_1.apiFetch)((0, triggers_1.withQuery)(`${base(taskId)}/results/${encodeURIComponent(resultId)}`, scope));
|
|
213
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which daemon harnesses a Main Chat turn may carry the owner-chat Duty tools on
|
|
3
|
+
* (`duty_list`, `duty_start`, `duty_update_reporting`, `duty_pause`): the tools
|
|
4
|
+
* that let an Agent's owner start, pause or change a Duty in their own words
|
|
5
|
+
* (OSK-33476). One list, here, because both ends of the wire act on it and the
|
|
6
|
+
* daemon cannot import the API (`@skrr-ai/auth-core/owner-chat-duty-harnesses`):
|
|
7
|
+
*
|
|
8
|
+
* - the server (`api/server/services/AgentWorker/bridge.js`) offers the tools to
|
|
9
|
+
* a listed harness's dispatch, and seals the owner's message on the dispatch
|
|
10
|
+
* receipt the tools are checked against when one is called;
|
|
11
|
+
* - the server's intent check (`api/server/services/Duties/OwnerChatDutyIntent.js`)
|
|
12
|
+
* has a bounded, tool-less inference on the chat's own daemon for every listed
|
|
13
|
+
* harness, and refuses any other;
|
|
14
|
+
* - the daemon mints the session credential the tools need
|
|
15
|
+
* (`daemon/src/connection-helpers/session-credential.ts`) and admits the turn
|
|
16
|
+
* (`daemon/src/delegation-mcp/owner-chat-duty-gate.ts`) only for a listed
|
|
17
|
+
* harness, whose backend mounts the tools.
|
|
18
|
+
*
|
|
19
|
+
* A harness is listed only when ALL THREE hold: its daemon backend can mount an
|
|
20
|
+
* extra stdio MCP server for the turn, the server can run the intent check for
|
|
21
|
+
* it, and the daemon mints its credential. Listing one that lacks the second
|
|
22
|
+
* would offer tools whose every change is refused.
|
|
23
|
+
*
|
|
24
|
+
* The first-party harness is deliberately NOT listed yet. Its ACP backend could
|
|
25
|
+
* mount the server as it mounts `delegation` (`daemon/src/backends/acp.ts`; not wired,
|
|
26
|
+
* and a resident engine reads MCP bindings from its turn channel, not a file), but
|
|
27
|
+
* the intent check has no qualified local inference for it:
|
|
28
|
+
* the daemon's private inference answers only `claude` and the native Codex draft
|
|
29
|
+
* (`daemon/src/continuity/inference.ts`, `PROVIDERS`), and a hosted check would
|
|
30
|
+
* move a local chat's judgment and its cost onto the platform, which is a product
|
|
31
|
+
* decision, not this list's.
|
|
32
|
+
*
|
|
33
|
+
* The server stays the authority whatever this list says: the tools act only after
|
|
34
|
+
* `OwnerChatDuty.run` re-checks the stored owner stamp, the quoted request and the
|
|
35
|
+
* intent. An older peer that does not know a provider is listed only ever withholds
|
|
36
|
+
* the tools.
|
|
37
|
+
*
|
|
38
|
+
* Pure: no `node:` imports and nothing read at module load.
|
|
39
|
+
*/
|
|
40
|
+
/** Canonical provider spellings, in the order they were admitted. */
|
|
41
|
+
export declare const OWNER_CHAT_DUTY_TOOL_HARNESSES: readonly string[];
|
|
42
|
+
/** Whether a Main Chat turn on this harness may carry the owner-chat Duty tools. */
|
|
43
|
+
export declare function supportsOwnerChatDutyTools(provider: unknown): boolean;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var ownerChatDutyHarnesses_exports = {};
|
|
20
|
+
__export(ownerChatDutyHarnesses_exports, {
|
|
21
|
+
OWNER_CHAT_DUTY_TOOL_HARNESSES: () => OWNER_CHAT_DUTY_TOOL_HARNESSES,
|
|
22
|
+
supportsOwnerChatDutyTools: () => supportsOwnerChatDutyTools
|
|
23
|
+
});
|
|
24
|
+
module.exports = __toCommonJS(ownerChatDutyHarnesses_exports);
|
|
25
|
+
var import_firstPartyHarness = require("./firstPartyHarness.js");
|
|
26
|
+
const OWNER_CHAT_DUTY_TOOL_HARNESSES = Object.freeze(["codex", "claude"]);
|
|
27
|
+
function supportsOwnerChatDutyTools(provider) {
|
|
28
|
+
if (typeof provider !== "string" || !provider)
|
|
29
|
+
return false;
|
|
30
|
+
return OWNER_CHAT_DUTY_TOOL_HARNESSES.includes(String((0, import_firstPartyHarness.canonicalHarnessProvider)(provider)));
|
|
31
|
+
}
|
|
32
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
33
|
+
0 && (module.exports = {
|
|
34
|
+
OWNER_CHAT_DUTY_TOOL_HARNESSES,
|
|
35
|
+
supportsOwnerChatDutyTools
|
|
36
|
+
});
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which daemon harnesses a Main Chat turn may carry the owner-chat Duty tools on
|
|
3
|
+
* (`duty_list`, `duty_start`, `duty_update_reporting`, `duty_pause`): the tools
|
|
4
|
+
* that let an Agent's owner start, pause or change a Duty in their own words
|
|
5
|
+
* (OSK-33476). One list, here, because both ends of the wire act on it and the
|
|
6
|
+
* daemon cannot import the API (`@skrr-ai/auth-core/owner-chat-duty-harnesses`):
|
|
7
|
+
*
|
|
8
|
+
* - the server (`api/server/services/AgentWorker/bridge.js`) offers the tools to
|
|
9
|
+
* a listed harness's dispatch, and seals the owner's message on the dispatch
|
|
10
|
+
* receipt the tools are checked against when one is called;
|
|
11
|
+
* - the server's intent check (`api/server/services/Duties/OwnerChatDutyIntent.js`)
|
|
12
|
+
* has a bounded, tool-less inference on the chat's own daemon for every listed
|
|
13
|
+
* harness, and refuses any other;
|
|
14
|
+
* - the daemon mints the session credential the tools need
|
|
15
|
+
* (`daemon/src/connection-helpers/session-credential.ts`) and admits the turn
|
|
16
|
+
* (`daemon/src/delegation-mcp/owner-chat-duty-gate.ts`) only for a listed
|
|
17
|
+
* harness, whose backend mounts the tools.
|
|
18
|
+
*
|
|
19
|
+
* A harness is listed only when ALL THREE hold: its daemon backend can mount an
|
|
20
|
+
* extra stdio MCP server for the turn, the server can run the intent check for
|
|
21
|
+
* it, and the daemon mints its credential. Listing one that lacks the second
|
|
22
|
+
* would offer tools whose every change is refused.
|
|
23
|
+
*
|
|
24
|
+
* The first-party harness is deliberately NOT listed yet. Its ACP backend could
|
|
25
|
+
* mount the server as it mounts `delegation` (`daemon/src/backends/acp.ts`; not wired,
|
|
26
|
+
* and a resident engine reads MCP bindings from its turn channel, not a file), but
|
|
27
|
+
* the intent check has no qualified local inference for it:
|
|
28
|
+
* the daemon's private inference answers only `claude` and the native Codex draft
|
|
29
|
+
* (`daemon/src/continuity/inference.ts`, `PROVIDERS`), and a hosted check would
|
|
30
|
+
* move a local chat's judgment and its cost onto the platform, which is a product
|
|
31
|
+
* decision, not this list's.
|
|
32
|
+
*
|
|
33
|
+
* The server stays the authority whatever this list says: the tools act only after
|
|
34
|
+
* `OwnerChatDuty.run` re-checks the stored owner stamp, the quoted request and the
|
|
35
|
+
* intent. An older peer that does not know a provider is listed only ever withholds
|
|
36
|
+
* the tools.
|
|
37
|
+
*
|
|
38
|
+
* Pure: no `node:` imports and nothing read at module load.
|
|
39
|
+
*/
|
|
40
|
+
/** Canonical provider spellings, in the order they were admitted. */
|
|
41
|
+
export declare const OWNER_CHAT_DUTY_TOOL_HARNESSES: readonly string[];
|
|
42
|
+
/** Whether a Main Chat turn on this harness may carry the owner-chat Duty tools. */
|
|
43
|
+
export declare function supportsOwnerChatDutyTools(provider: unknown): boolean;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Which daemon harnesses a Main Chat turn may carry the owner-chat Duty tools on
|
|
3
|
+
* (`duty_list`, `duty_start`, `duty_update_reporting`, `duty_pause`): the tools
|
|
4
|
+
* that let an Agent's owner start, pause or change a Duty in their own words
|
|
5
|
+
* (OSK-33476). One list, here, because both ends of the wire act on it and the
|
|
6
|
+
* daemon cannot import the API (`@skrr-ai/auth-core/owner-chat-duty-harnesses`):
|
|
7
|
+
*
|
|
8
|
+
* - the server (`api/server/services/AgentWorker/bridge.js`) offers the tools to
|
|
9
|
+
* a listed harness's dispatch, and seals the owner's message on the dispatch
|
|
10
|
+
* receipt the tools are checked against when one is called;
|
|
11
|
+
* - the server's intent check (`api/server/services/Duties/OwnerChatDutyIntent.js`)
|
|
12
|
+
* has a bounded, tool-less inference on the chat's own daemon for every listed
|
|
13
|
+
* harness, and refuses any other;
|
|
14
|
+
* - the daemon mints the session credential the tools need
|
|
15
|
+
* (`daemon/src/connection-helpers/session-credential.ts`) and admits the turn
|
|
16
|
+
* (`daemon/src/delegation-mcp/owner-chat-duty-gate.ts`) only for a listed
|
|
17
|
+
* harness, whose backend mounts the tools.
|
|
18
|
+
*
|
|
19
|
+
* A harness is listed only when ALL THREE hold: its daemon backend can mount an
|
|
20
|
+
* extra stdio MCP server for the turn, the server can run the intent check for
|
|
21
|
+
* it, and the daemon mints its credential. Listing one that lacks the second
|
|
22
|
+
* would offer tools whose every change is refused.
|
|
23
|
+
*
|
|
24
|
+
* The first-party harness is deliberately NOT listed yet. Its ACP backend could
|
|
25
|
+
* mount the server as it mounts `delegation` (`daemon/src/backends/acp.ts`; not wired,
|
|
26
|
+
* and a resident engine reads MCP bindings from its turn channel, not a file), but
|
|
27
|
+
* the intent check has no qualified local inference for it:
|
|
28
|
+
* the daemon's private inference answers only `claude` and the native Codex draft
|
|
29
|
+
* (`daemon/src/continuity/inference.ts`, `PROVIDERS`), and a hosted check would
|
|
30
|
+
* move a local chat's judgment and its cost onto the platform, which is a product
|
|
31
|
+
* decision, not this list's.
|
|
32
|
+
*
|
|
33
|
+
* The server stays the authority whatever this list says: the tools act only after
|
|
34
|
+
* `OwnerChatDuty.run` re-checks the stored owner stamp, the quoted request and the
|
|
35
|
+
* intent. An older peer that does not know a provider is listed only ever withholds
|
|
36
|
+
* the tools.
|
|
37
|
+
*
|
|
38
|
+
* Pure: no `node:` imports and nothing read at module load.
|
|
39
|
+
*/
|
|
40
|
+
import { canonicalHarnessProvider } from './firstPartyHarness.js';
|
|
41
|
+
/** Canonical provider spellings, in the order they were admitted. */
|
|
42
|
+
export const OWNER_CHAT_DUTY_TOOL_HARNESSES = Object.freeze(['codex', 'claude']);
|
|
43
|
+
/** Whether a Main Chat turn on this harness may carry the owner-chat Duty tools. */
|
|
44
|
+
export function supportsOwnerChatDutyTools(provider) {
|
|
45
|
+
if (typeof provider !== 'string' || !provider)
|
|
46
|
+
return false;
|
|
47
|
+
return OWNER_CHAT_DUTY_TOOL_HARNESSES.includes(String(canonicalHarnessProvider(provider)));
|
|
48
|
+
}
|
|
@@ -82,6 +82,16 @@
|
|
|
82
82
|
"default": "./dist/cjs/inferenceBrokerHarnesses.js"
|
|
83
83
|
}
|
|
84
84
|
},
|
|
85
|
+
"./owner-chat-duty-harnesses": {
|
|
86
|
+
"import": {
|
|
87
|
+
"types": "./dist/esm/ownerChatDutyHarnesses.d.ts",
|
|
88
|
+
"default": "./dist/esm/ownerChatDutyHarnesses.js"
|
|
89
|
+
},
|
|
90
|
+
"require": {
|
|
91
|
+
"types": "./dist/cjs/ownerChatDutyHarnesses.d.ts",
|
|
92
|
+
"default": "./dist/cjs/ownerChatDutyHarnesses.js"
|
|
93
|
+
}
|
|
94
|
+
},
|
|
85
95
|
"./harness-skill-layout": {
|
|
86
96
|
"import": {
|
|
87
97
|
"types": "./dist/esm/harnessSkillLayout.d.ts",
|