@skrr-ai/cli 0.1.216 → 0.1.218
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/watch-escalated.d.ts +8 -0
- package/dist/commands/agent/message/watch-escalated.js +16 -0
- package/dist/commands/agent/message/watch-resolved.d.ts +8 -0
- package/dist/commands/agent/message/watch-resolved.js +16 -0
- package/dist/commands/convos/transcript.js +1 -0
- 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/spaces/auto-executor/preview.d.ts +7 -0
- package/dist/commands/spaces/auto-executor/preview.js +21 -2
- package/dist/commands/wiki/write.js +7 -2
- package/dist/lib/agent-chat-queue.js +3 -3
- package/dist/lib/duties.d.ts +2 -0
- package/dist/lib/duties.js +41 -2
- package/dist/lib/permission-rules.d.ts +4 -1
- package/dist/lib/permission-rules.js +16 -3
- package/dist/lib/space-proposals.js +8 -1
- package/dist/lib/space-write-policy.js +18 -2
- package/dist/lib/watch-outcome-command.d.ts +14 -0
- package/dist/lib/watch-outcome-command.js +48 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/ownerChatDutyHarnesses.d.ts +50 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/cjs/ownerChatDutyHarnesses.js +40 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/ownerChatDutyHarnesses.d.ts +50 -0
- package/dist/node_modules/@skrr-ai/auth-core/dist/esm/ownerChatDutyHarnesses.js +59 -0
- package/dist/node_modules/@skrr-ai/auth-core/package.json +10 -0
- package/dist/node_modules/@skrr-ai/data-provider/index.js +10441 -10426
- package/oclif.manifest.json +138 -2
- package/package.json +2 -2
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WatchOutcomeCommand = void 0;
|
|
4
|
+
const core_1 = require("@oclif/core");
|
|
5
|
+
const base_command_1 = require("../base-command");
|
|
6
|
+
const api_fetch_1 = require("./api-fetch");
|
|
7
|
+
const message_intent_1 = require("./message-intent");
|
|
8
|
+
/**
|
|
9
|
+
* Shared body of `agent message watch-resolved` and `watch-escalated`: a follow-up watch wake
|
|
10
|
+
* declares how it ended (OSK-33334). The server records it on the wake's Run, bound to the attempt
|
|
11
|
+
* and follow-up it resolves from the session token; nothing here names either.
|
|
12
|
+
*/
|
|
13
|
+
class WatchOutcomeCommand extends base_command_1.BaseCommand {
|
|
14
|
+
static flags = {
|
|
15
|
+
json: core_1.Flags.boolean({
|
|
16
|
+
description: 'Accepted for consistency; this command always outputs JSON',
|
|
17
|
+
}),
|
|
18
|
+
};
|
|
19
|
+
async declareWatchOutcome() {
|
|
20
|
+
const sessionContext = (0, message_intent_1.resolveMessageCommandSessionContext)({
|
|
21
|
+
// A person has no watch turn to settle: only a session can.
|
|
22
|
+
requireHumanAuth: () => undefined,
|
|
23
|
+
});
|
|
24
|
+
if (!sessionContext?.sessionId) {
|
|
25
|
+
this.failWithCliError({
|
|
26
|
+
message: `\`agent message ${this.disposition === 'watch_resolved' ? 'watch-resolved' : 'watch-escalated'}\` declares how a running watch check ended, so it only works inside a daemon session.`,
|
|
27
|
+
code: 'WATCH_OUTCOME_REQUIRES_SESSION',
|
|
28
|
+
exit: 2,
|
|
29
|
+
retryable: false,
|
|
30
|
+
details: {
|
|
31
|
+
suggestion: 'Run it from the scheduled watch check whose turn it is.',
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
try {
|
|
36
|
+
const result = await (0, api_fetch_1.apiFetch)(`/api/agentic/sessions/${encodeURIComponent(sessionContext.sessionId)}/turn-disposition`, {
|
|
37
|
+
method: 'POST',
|
|
38
|
+
credential: (0, message_intent_1.sessionCredential)(sessionContext.token),
|
|
39
|
+
body: { disposition: this.disposition },
|
|
40
|
+
});
|
|
41
|
+
this.printJsonResult(result);
|
|
42
|
+
}
|
|
43
|
+
catch (error) {
|
|
44
|
+
this.handleApiError(error);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.WatchOutcomeCommand = WatchOutcomeCommand;
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
* asks whether the owner's message authorizes the change, and refuses any
|
|
13
|
+
* harness this list does not name;
|
|
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
|
+
* Where each listed harness's intent check runs:
|
|
25
|
+
*
|
|
26
|
+
* - `codex`: on the chat's own daemon, through Codex's native no-tools draft, on
|
|
27
|
+
* the person's own Codex sign-in.
|
|
28
|
+
* - `claude`: on the chat's own daemon, through the daemon's private Claude
|
|
29
|
+
* inference (no tools), on the person's own Claude sign-in.
|
|
30
|
+
* - the first-party harness: HOSTED, on the platform's managed inference, billed
|
|
31
|
+
* to the Agent's owner (owner decision recorded on OSK-33476). The daemon has no
|
|
32
|
+
* qualified local inference for it (`daemon/src/continuity/inference.ts`,
|
|
33
|
+
* `PROVIDERS`), and its turn's own model calls are already sent by the
|
|
34
|
+
* platform's managed inference, so the check sends nothing new off the machine.
|
|
35
|
+
* Its ACP backend mounts the tools on both engine paths (`daemon/src/backends/acp.ts`).
|
|
36
|
+
*
|
|
37
|
+
* The first two keep their local check: their bounded calls stay on the person's
|
|
38
|
+
* own sign-in, and nothing here moves them.
|
|
39
|
+
*
|
|
40
|
+
* The server stays the authority whatever this list says: the tools act only after
|
|
41
|
+
* `OwnerChatDuty.run` re-checks the stored owner stamp, the quoted request and the
|
|
42
|
+
* intent. An older peer that does not know a provider is listed only ever withholds
|
|
43
|
+
* the tools.
|
|
44
|
+
*
|
|
45
|
+
* Pure: no `node:` imports and nothing read at module load.
|
|
46
|
+
*/
|
|
47
|
+
/** Canonical provider spellings, in the order they were admitted. */
|
|
48
|
+
export declare const OWNER_CHAT_DUTY_TOOL_HARNESSES: readonly string[];
|
|
49
|
+
/** Whether a Main Chat turn on this harness may carry the owner-chat Duty tools. */
|
|
50
|
+
export declare function supportsOwnerChatDutyTools(provider: unknown): boolean;
|
|
@@ -0,0 +1,40 @@
|
|
|
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([
|
|
27
|
+
"codex",
|
|
28
|
+
"claude",
|
|
29
|
+
import_firstPartyHarness.FIRST_PARTY_HARNESS.provider
|
|
30
|
+
]);
|
|
31
|
+
function supportsOwnerChatDutyTools(provider) {
|
|
32
|
+
if (typeof provider !== "string" || !provider)
|
|
33
|
+
return false;
|
|
34
|
+
return OWNER_CHAT_DUTY_TOOL_HARNESSES.includes(String((0, import_firstPartyHarness.canonicalHarnessProvider)(provider)));
|
|
35
|
+
}
|
|
36
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
37
|
+
0 && (module.exports = {
|
|
38
|
+
OWNER_CHAT_DUTY_TOOL_HARNESSES,
|
|
39
|
+
supportsOwnerChatDutyTools
|
|
40
|
+
});
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
* asks whether the owner's message authorizes the change, and refuses any
|
|
13
|
+
* harness this list does not name;
|
|
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
|
+
* Where each listed harness's intent check runs:
|
|
25
|
+
*
|
|
26
|
+
* - `codex`: on the chat's own daemon, through Codex's native no-tools draft, on
|
|
27
|
+
* the person's own Codex sign-in.
|
|
28
|
+
* - `claude`: on the chat's own daemon, through the daemon's private Claude
|
|
29
|
+
* inference (no tools), on the person's own Claude sign-in.
|
|
30
|
+
* - the first-party harness: HOSTED, on the platform's managed inference, billed
|
|
31
|
+
* to the Agent's owner (owner decision recorded on OSK-33476). The daemon has no
|
|
32
|
+
* qualified local inference for it (`daemon/src/continuity/inference.ts`,
|
|
33
|
+
* `PROVIDERS`), and its turn's own model calls are already sent by the
|
|
34
|
+
* platform's managed inference, so the check sends nothing new off the machine.
|
|
35
|
+
* Its ACP backend mounts the tools on both engine paths (`daemon/src/backends/acp.ts`).
|
|
36
|
+
*
|
|
37
|
+
* The first two keep their local check: their bounded calls stay on the person's
|
|
38
|
+
* own sign-in, and nothing here moves them.
|
|
39
|
+
*
|
|
40
|
+
* The server stays the authority whatever this list says: the tools act only after
|
|
41
|
+
* `OwnerChatDuty.run` re-checks the stored owner stamp, the quoted request and the
|
|
42
|
+
* intent. An older peer that does not know a provider is listed only ever withholds
|
|
43
|
+
* the tools.
|
|
44
|
+
*
|
|
45
|
+
* Pure: no `node:` imports and nothing read at module load.
|
|
46
|
+
*/
|
|
47
|
+
/** Canonical provider spellings, in the order they were admitted. */
|
|
48
|
+
export declare const OWNER_CHAT_DUTY_TOOL_HARNESSES: readonly string[];
|
|
49
|
+
/** Whether a Main Chat turn on this harness may carry the owner-chat Duty tools. */
|
|
50
|
+
export declare function supportsOwnerChatDutyTools(provider: unknown): boolean;
|
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
* asks whether the owner's message authorizes the change, and refuses any
|
|
13
|
+
* harness this list does not name;
|
|
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
|
+
* Where each listed harness's intent check runs:
|
|
25
|
+
*
|
|
26
|
+
* - `codex`: on the chat's own daemon, through Codex's native no-tools draft, on
|
|
27
|
+
* the person's own Codex sign-in.
|
|
28
|
+
* - `claude`: on the chat's own daemon, through the daemon's private Claude
|
|
29
|
+
* inference (no tools), on the person's own Claude sign-in.
|
|
30
|
+
* - the first-party harness: HOSTED, on the platform's managed inference, billed
|
|
31
|
+
* to the Agent's owner (owner decision recorded on OSK-33476). The daemon has no
|
|
32
|
+
* qualified local inference for it (`daemon/src/continuity/inference.ts`,
|
|
33
|
+
* `PROVIDERS`), and its turn's own model calls are already sent by the
|
|
34
|
+
* platform's managed inference, so the check sends nothing new off the machine.
|
|
35
|
+
* Its ACP backend mounts the tools on both engine paths (`daemon/src/backends/acp.ts`).
|
|
36
|
+
*
|
|
37
|
+
* The first two keep their local check: their bounded calls stay on the person's
|
|
38
|
+
* own sign-in, and nothing here moves them.
|
|
39
|
+
*
|
|
40
|
+
* The server stays the authority whatever this list says: the tools act only after
|
|
41
|
+
* `OwnerChatDuty.run` re-checks the stored owner stamp, the quoted request and the
|
|
42
|
+
* intent. An older peer that does not know a provider is listed only ever withholds
|
|
43
|
+
* the tools.
|
|
44
|
+
*
|
|
45
|
+
* Pure: no `node:` imports and nothing read at module load.
|
|
46
|
+
*/
|
|
47
|
+
import { FIRST_PARTY_HARNESS, canonicalHarnessProvider } from './firstPartyHarness.js';
|
|
48
|
+
/** Canonical provider spellings, in the order they were admitted. */
|
|
49
|
+
export const OWNER_CHAT_DUTY_TOOL_HARNESSES = Object.freeze([
|
|
50
|
+
'codex',
|
|
51
|
+
'claude',
|
|
52
|
+
FIRST_PARTY_HARNESS.provider,
|
|
53
|
+
]);
|
|
54
|
+
/** Whether a Main Chat turn on this harness may carry the owner-chat Duty tools. */
|
|
55
|
+
export function supportsOwnerChatDutyTools(provider) {
|
|
56
|
+
if (typeof provider !== 'string' || !provider)
|
|
57
|
+
return false;
|
|
58
|
+
return OWNER_CHAT_DUTY_TOOL_HARNESSES.includes(String(canonicalHarnessProvider(provider)));
|
|
59
|
+
}
|
|
@@ -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",
|