shortcutxl 0.3.88 → 0.3.89
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/BINARY-INVENTORY.json +13 -13
- package/CHANGELOG.md +5 -0
- package/dist/app/agent-session-runtime-adapter.js +4 -1
- package/dist/app/background-agents/shorty/fix-prompts.d.ts +2 -2
- package/dist/app/background-agents/shorty/inspector/runtime.d.ts +1 -0
- package/dist/app/background-agents/shorty/inspector/runtime.js +25 -12
- package/dist/app/background-agents/shorty/runtime.js +3 -0
- package/dist/app/background-agents/shorty/types.d.ts +3 -2
- package/dist/app/modes/action/prompt.js +1 -1
- package/dist/app/modes/index.d.ts +1 -0
- package/dist/app/modes/index.js +4 -1
- package/dist/app/modes/installation/prompt-windows.js +1 -1
- package/dist/app/modes/skill-forge/agent.d.ts +13 -0
- package/dist/app/modes/skill-forge/agent.js +33 -0
- package/dist/app/modes/skill-forge/prompt.d.ts +3 -0
- package/dist/app/modes/skill-forge/prompt.js +102 -0
- package/dist/app/prompts/spreadjs-api-reference.json +0 -6
- package/dist/app/session/session-catalog.d.ts +3 -0
- package/dist/app/session/session-catalog.js +2 -1
- package/dist/app/session/session-metadata.js +11 -0
- package/dist/app/session/session-reader.d.ts +3 -0
- package/dist/app/session/session-reader.js +1 -0
- package/dist/app/subagents/defaults.d.ts +2 -1
- package/dist/app/subagents/defaults.js +1 -1
- package/dist/app/tools/skill-forge.d.ts +9 -0
- package/dist/app/tools/skill-forge.js +24 -0
- package/dist/app/tools/task/manager.js +2 -1
- package/dist/app/tools/task/task.d.ts +3 -0
- package/dist/app/tools/task/task.js +31 -9
- package/dist/cli.js +714 -165
- package/dist/contracts/agent-api.d.ts +30 -24
- package/dist/contracts/agent-api.js +17 -13
- package/dist/contracts/agent-session-store.d.ts +3 -0
- package/dist/contracts/agent-skill-forge.d.ts +67 -0
- package/dist/contracts/agent-skill-forge.js +53 -0
- package/dist/core/embedded-agent-facade.d.ts +2 -1
- package/dist/core/embedded-agent-facade.js +5 -2
- package/dist/core/pending-host-tool-requests.d.ts +1 -1
- package/dist/core/pending-host-tool-requests.js +1 -1
- package/dist/core/prompts/agent-guidelines.d.ts +3 -3
- package/dist/core/prompts/agent-guidelines.js +23 -14
- package/dist/core/skill-forge/index.d.ts +3 -0
- package/dist/core/skill-forge/index.js +3 -0
- package/dist/core/skill-forge/skill-forge-state-manager.d.ts +20 -0
- package/dist/core/skill-forge/skill-forge-state-manager.js +39 -0
- package/dist/credits/shortcut-credits.d.ts +15 -0
- package/dist/credits/shortcut-credits.js +53 -0
- package/dist/embedded-agent/ai-invoke.d.ts +1 -1
- package/dist/embedded-agent/ai-invoke.js +6 -5
- package/dist/embedded-agent/compose.js +53 -37
- package/dist/embedded-agent/host-runtime-options.d.ts +1 -1
- package/dist/embedded-agent/host-runtime-options.js +12 -12
- package/dist/embedded-agent/host-tools/execute-bash-command/contract.js +4 -2
- package/dist/embedded-agent/host-tools/execute-code/allowed-functions.json +0 -2
- package/dist/embedded-agent/index.d.ts +3 -3
- package/dist/embedded-agent/inspector/agent.d.ts +14 -0
- package/dist/embedded-agent/{review → inspector}/agent.js +14 -7
- package/dist/embedded-agent/{review → inspector}/coordinator.d.ts +17 -11
- package/dist/embedded-agent/{review → inspector}/coordinator.js +49 -29
- package/dist/embedded-agent/inspector/findings.d.ts +7 -0
- package/dist/embedded-agent/{review → inspector}/findings.js +9 -9
- package/dist/embedded-agent/prompt/modes/action.js +1 -1
- package/dist/embedded-agent/prompt/modes/ask.js +1 -1
- package/dist/embedded-agent/suggestions.js +2 -1
- package/dist/embedded-agent/worker-bridge/dispatch.js +7 -4
- package/dist/embedded-agent/worker-bridge/host-client.d.ts +3 -1
- package/dist/embedded-agent/worker-bridge/host-client.js +31 -14
- package/dist/endpoints.d.ts +1 -0
- package/dist/endpoints.js +1 -0
- package/dist/main.js +32 -1
- package/dist/mode-names.d.ts +5 -0
- package/dist/mode-names.js +4 -2
- package/dist/rpc/index.d.ts +1 -1
- package/dist/rpc/rpc-host.d.ts +30 -1
- package/dist/rpc/rpc-host.js +129 -25
- package/dist/rpc/rpc-mode.d.ts +1 -1
- package/dist/rpc/rpc-types.d.ts +21 -2
- package/dist/shell/components/shorty-issues.d.ts +3 -3
- package/dist/shell/components/shorty-issues.js +5 -5
- package/dist/shell/interactive/interactive-mode.js +11 -11
- package/dist/subagent-model-policy.d.ts +12 -2
- package/dist/subagent-model-policy.js +37 -2
- package/dist/subagent-thinking-policy.d.ts +5 -3
- package/dist/subagent-thinking-policy.js +5 -4
- package/dist/tool-names.d.ts +1 -0
- package/dist/tool-names.js +1 -0
- package/native-app/main/index.js +39 -7
- package/native-app/package.json +1 -1
- package/native-app/renderer/assets/Alegreya-Italic-Variable-BNGsTFBD.woff2 +0 -0
- package/native-app/renderer/assets/Alegreya-Variable-BCUEsrKK.woff2 +0 -0
- package/native-app/renderer/assets/AvQest-DwQOLw3s.woff2 +0 -0
- package/native-app/renderer/assets/Cinzel-Variable-BOqWLKHx.woff2 +0 -0
- package/native-app/renderer/assets/DiabloHeavy-aRIenZkJ.woff2 +0 -0
- package/native-app/renderer/assets/anvil-BULXnOOB.png +3 -0
- package/native-app/renderer/assets/frame-DDQ6ScMl.png +3 -0
- package/native-app/renderer/assets/{index-DNnVuJQL.css → index-DsYjsaRU.css} +1448 -67
- package/native-app/renderer/assets/{index-DI6nQ3aM.js → index-SuRESuDS.js} +4261 -298
- package/native-app/renderer/assets/plaque-C6n7SCaF.png +3 -0
- package/native-app/renderer/assets/rock-CXFUiLgi.png +3 -0
- package/native-app/renderer/index.html +2 -2
- package/package.json +6 -2
- package/skills/skill-creator/SKILL.md +89 -440
- package/user-docs/dist/index.html +1 -1
- package/xll/python/Lib/site-packages/httpx-0.28.1.dist-info/RECORD +1 -1
- package/xll/python/Lib/site-packages/idna-3.18.dist-info/RECORD +1 -1
- package/xll/python/Lib/site-packages/pip-26.2.dist-info/RECORD +3 -3
- package/xll/python/Lib/site-packages/pywin32-311.dist-info/RECORD +2 -2
- package/xll/python/Scripts/httpx.exe +0 -0
- package/xll/python/Scripts/idna.exe +0 -0
- package/xll/python/Scripts/pip.exe +0 -0
- package/xll/python/Scripts/pip3.13.exe +0 -0
- package/xll/python/Scripts/pip3.exe +0 -0
- package/xll/python/Scripts/pywin32_postinstall.exe +0 -0
- package/xll/python/Scripts/pywin32_testall.exe +0 -0
- package/dist/embedded-agent/review/agent.d.ts +0 -14
- package/dist/embedded-agent/review/findings.d.ts +0 -7
- package/skills/skill-creator/LICENSE.txt +0 -202
- package/skills/skill-creator/agents/analyzer.md +0 -274
- package/skills/skill-creator/agents/comparator.md +0 -202
- package/skills/skill-creator/agents/grader.md +0 -223
- package/skills/skill-creator/assets/eval_review.html +0 -292
- package/skills/skill-creator/eval-viewer/generate_review.py +0 -471
- package/skills/skill-creator/eval-viewer/viewer.html +0 -1478
- package/skills/skill-creator/references/schemas.md +0 -430
- package/skills/skill-creator/scripts/__init__.py +0 -0
- package/skills/skill-creator/scripts/aggregate_benchmark.py +0 -401
- package/skills/skill-creator/scripts/generate_report.py +0 -326
- package/skills/skill-creator/scripts/improve_description.py +0 -232
- package/skills/skill-creator/scripts/package_skill.py +0 -136
- package/skills/skill-creator/scripts/quick_validate.py +0 -103
- package/skills/skill-creator/scripts/run_eval.py +0 -223
- package/skills/skill-creator/scripts/run_loop.py +0 -324
- package/skills/skill-creator/scripts/utils.py +0 -47
package/BINARY-INVENTORY.json
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"generatedAt": "2026-
|
|
3
|
+
"generatedAt": "2026-09-02T01:14:28.575Z",
|
|
4
4
|
"package": "shortcutxl",
|
|
5
5
|
"build": {
|
|
6
6
|
"builder": "github-actions",
|
|
7
7
|
"repository": "lyfegame/shortcut",
|
|
8
|
-
"sourceRef": "refs/heads/
|
|
9
|
-
"sourceCommit": "
|
|
10
|
-
"workflowRef": "lyfegame/shortcut/.github/workflows/release-shortcut-cli-npm-package.yml@refs/heads/
|
|
11
|
-
"runId": "
|
|
8
|
+
"sourceRef": "refs/heads/codex/cli-daily-credit-usage",
|
|
9
|
+
"sourceCommit": "79a4adfc21dce36c575744cbbf07df842928b610",
|
|
10
|
+
"workflowRef": "lyfegame/shortcut/.github/workflows/release-shortcut-cli-npm-package.yml@refs/heads/codex/cli-daily-credit-usage",
|
|
11
|
+
"runId": "33578448535",
|
|
12
12
|
"runnerOs": "Windows",
|
|
13
13
|
"runnerImage": "win25-vs2026",
|
|
14
|
-
"runnerImageVersion": "
|
|
14
|
+
"runnerImageVersion": "20260824.214.3"
|
|
15
15
|
},
|
|
16
16
|
"binaryExtensions": [
|
|
17
17
|
".dll",
|
|
@@ -550,7 +550,7 @@
|
|
|
550
550
|
},
|
|
551
551
|
{
|
|
552
552
|
"path": "xll/python/Scripts/httpx.exe",
|
|
553
|
-
"sha256": "
|
|
553
|
+
"sha256": "56ecd26f514b1582761c3403f4938d112adc5f033a63d4bc945181079ca82ead",
|
|
554
554
|
"source": "httpx console launcher installed into embedded Python",
|
|
555
555
|
"version": "see packaged httpx distribution",
|
|
556
556
|
"builtBy": "third-party",
|
|
@@ -558,7 +558,7 @@
|
|
|
558
558
|
},
|
|
559
559
|
{
|
|
560
560
|
"path": "xll/python/Scripts/idna.exe",
|
|
561
|
-
"sha256": "
|
|
561
|
+
"sha256": "ffda0108e10dc93a09f57419aac0a52d85871bb787308bf946ac851cb11f703a",
|
|
562
562
|
"source": "Python package console launcher installed into embedded Python",
|
|
563
563
|
"version": "see owning Python package metadata in site-packages",
|
|
564
564
|
"builtBy": "third-party",
|
|
@@ -566,7 +566,7 @@
|
|
|
566
566
|
},
|
|
567
567
|
{
|
|
568
568
|
"path": "xll/python/Scripts/pip.exe",
|
|
569
|
-
"sha256": "
|
|
569
|
+
"sha256": "ce0f86f7cf5cc2882a4821943d3af21f7c41218ff43e7a1f62b18f185aefde97",
|
|
570
570
|
"source": "pip console launcher installed into embedded Python",
|
|
571
571
|
"version": "see packaged pip distribution",
|
|
572
572
|
"builtBy": "third-party",
|
|
@@ -574,7 +574,7 @@
|
|
|
574
574
|
},
|
|
575
575
|
{
|
|
576
576
|
"path": "xll/python/Scripts/pip3.13.exe",
|
|
577
|
-
"sha256": "
|
|
577
|
+
"sha256": "ce0f86f7cf5cc2882a4821943d3af21f7c41218ff43e7a1f62b18f185aefde97",
|
|
578
578
|
"source": "pip console launcher installed into embedded Python",
|
|
579
579
|
"version": "see packaged pip distribution",
|
|
580
580
|
"builtBy": "third-party",
|
|
@@ -582,7 +582,7 @@
|
|
|
582
582
|
},
|
|
583
583
|
{
|
|
584
584
|
"path": "xll/python/Scripts/pip3.exe",
|
|
585
|
-
"sha256": "
|
|
585
|
+
"sha256": "ce0f86f7cf5cc2882a4821943d3af21f7c41218ff43e7a1f62b18f185aefde97",
|
|
586
586
|
"source": "pip console launcher installed into embedded Python",
|
|
587
587
|
"version": "see packaged pip distribution",
|
|
588
588
|
"builtBy": "third-party",
|
|
@@ -590,7 +590,7 @@
|
|
|
590
590
|
},
|
|
591
591
|
{
|
|
592
592
|
"path": "xll/python/Scripts/pywin32_postinstall.exe",
|
|
593
|
-
"sha256": "
|
|
593
|
+
"sha256": "ff04c09d3e15a07d9a4006748c92e511f7e5c5abb2c78b68d7233e8f3ff19630",
|
|
594
594
|
"source": "Python package console launcher installed into embedded Python",
|
|
595
595
|
"version": "see owning Python package metadata in site-packages",
|
|
596
596
|
"builtBy": "third-party",
|
|
@@ -598,7 +598,7 @@
|
|
|
598
598
|
},
|
|
599
599
|
{
|
|
600
600
|
"path": "xll/python/Scripts/pywin32_testall.exe",
|
|
601
|
-
"sha256": "
|
|
601
|
+
"sha256": "c0641e3d6816baddcabb155f66ffb5de7c378b8257b95ad16f0a45e26184b879",
|
|
602
602
|
"source": "Python package console launcher installed into embedded Python",
|
|
603
603
|
"version": "see owning Python package metadata in site-packages",
|
|
604
604
|
"builtBy": "third-party",
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.3.89]
|
|
4
|
+
|
|
5
|
+
- **Skill Forge** - A recursive self-improvement loop for skills. Create or improve personal skills by giving Skill Forge tasks and a grading bar to train, evaluate, and refine against.
|
|
6
|
+
- **Credit usage at a glance** - See today's personal credit usage for non-teams users.
|
|
7
|
+
|
|
3
8
|
## [0.3.88]
|
|
4
9
|
|
|
5
10
|
- **More reliable app startup** - Fixed startup failures on slower or managed Windows computers.
|
|
@@ -68,9 +68,12 @@ function createAgentSessionCore(session, pendingHostToolRequests, shortyRuntime)
|
|
|
68
68
|
session.replaceToolsByName(configuration.toolNames);
|
|
69
69
|
session.agent.setSystemPrompt(configuration.systemPrompt);
|
|
70
70
|
},
|
|
71
|
-
async
|
|
71
|
+
async configureInspector(enabled) {
|
|
72
72
|
shortyRuntime.configureInspector(enabled);
|
|
73
73
|
},
|
|
74
|
+
async runReviewBuddy() {
|
|
75
|
+
shortyRuntime.runInspector();
|
|
76
|
+
},
|
|
74
77
|
async runContextReview(input) {
|
|
75
78
|
await shortyRuntime.runDoctor(input.trigger);
|
|
76
79
|
},
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AgentContextReviewRecommendation,
|
|
2
|
-
export declare function formatInspectorFixRequest(findings: readonly
|
|
1
|
+
import type { AgentContextReviewRecommendation, AgentInspectorFinding } from '../../../contracts/agent-api.js';
|
|
2
|
+
export declare function formatInspectorFixRequest(findings: readonly AgentInspectorFinding[]): string;
|
|
3
3
|
export declare function formatDoctorFixRequest(recommendations: readonly AgentContextReviewRecommendation[]): string;
|
|
4
4
|
//# sourceMappingURL=fix-prompts.d.ts.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { CreateLocalShortyRuntimeOptions, LocalShortyEvent } from '../types.js';
|
|
2
2
|
export interface LocalInspectorRuntime {
|
|
3
3
|
configure(enabled: boolean): void;
|
|
4
|
+
run(): void;
|
|
4
5
|
dispose(): void;
|
|
5
6
|
}
|
|
6
7
|
export declare function createLocalInspectorRuntime(options: CreateLocalShortyRuntimeOptions, emit: (event: LocalShortyEvent) => void): LocalInspectorRuntime;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { AgentEventKind } from '../../../../contracts/agent-api.js';
|
|
2
2
|
import { AgentLoopEventType } from '../../../../core/core-types.js';
|
|
3
3
|
import { getActiveUserMessageId } from '../../../../core/user-message-id.js';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { INSPECTOR_QUERY, INSPECTOR_SYSTEM_PROMPT } from '../../../../embedded-agent/inspector/agent.js';
|
|
5
|
+
import { InspectorCoordinator } from '../../../../embedded-agent/inspector/coordinator.js';
|
|
6
6
|
import { EXECUTE_CODE } from '../../../../tool-names.js';
|
|
7
7
|
import { convertToLlm } from '../../../messages.js';
|
|
8
8
|
import { runLocalShortyAgent } from '../execution.js';
|
|
@@ -38,10 +38,10 @@ function createLinkedTimeoutSignal(parent) {
|
|
|
38
38
|
}
|
|
39
39
|
export function createLocalInspectorRuntime(options, emit) {
|
|
40
40
|
const isAvailable = options.isInspectorAvailable ?? (() => true);
|
|
41
|
-
const coordinator = new
|
|
41
|
+
const coordinator = new InspectorCoordinator({
|
|
42
42
|
enabled: options.enabled ?? false,
|
|
43
43
|
emit: (event) => {
|
|
44
|
-
if (event.kind === AgentEventKind.
|
|
44
|
+
if (event.kind === AgentEventKind.InspectorUpdated)
|
|
45
45
|
emit(event);
|
|
46
46
|
},
|
|
47
47
|
hasCredits: options.hasCredits ?? (() => true),
|
|
@@ -65,7 +65,7 @@ export function createLocalInspectorRuntime(options, emit) {
|
|
|
65
65
|
const result = await runLocalShortyAgent({
|
|
66
66
|
modelRegistry: options.modelRegistry,
|
|
67
67
|
parent: {
|
|
68
|
-
systemPrompt:
|
|
68
|
+
systemPrompt: INSPECTOR_SYSTEM_PROMPT,
|
|
69
69
|
messages: convertToLlm([...input.mainContext.messages]),
|
|
70
70
|
tools: [executeCode],
|
|
71
71
|
continuationRunId: input.reviewId,
|
|
@@ -77,8 +77,8 @@ export function createLocalInspectorRuntime(options, emit) {
|
|
|
77
77
|
})
|
|
78
78
|
},
|
|
79
79
|
controller: {
|
|
80
|
-
kind: 'inspector
|
|
81
|
-
instruction:
|
|
80
|
+
kind: 'inspector',
|
|
81
|
+
instruction: INSPECTOR_QUERY,
|
|
82
82
|
effortLevel: 'low',
|
|
83
83
|
maxTurns: 6,
|
|
84
84
|
signal: timed.signal,
|
|
@@ -116,22 +116,22 @@ export function createLocalInspectorRuntime(options, emit) {
|
|
|
116
116
|
}
|
|
117
117
|
}
|
|
118
118
|
});
|
|
119
|
-
let
|
|
119
|
+
let inspectorTurnHadWorkbookWrite = false;
|
|
120
120
|
const unsubscribeSession = options.session.subscribe((event) => {
|
|
121
121
|
if (event.type === AgentLoopEventType.AgentStart) {
|
|
122
|
-
|
|
122
|
+
inspectorTurnHadWorkbookWrite = false;
|
|
123
123
|
return;
|
|
124
124
|
}
|
|
125
125
|
if (event.type === AgentLoopEventType.ToolExecutionEnd &&
|
|
126
126
|
event.toolName === EXECUTE_CODE &&
|
|
127
127
|
isAvailable() &&
|
|
128
128
|
hasWorkbookChanges(event.result?.details)) {
|
|
129
|
-
|
|
129
|
+
inspectorTurnHadWorkbookWrite = true;
|
|
130
130
|
return;
|
|
131
131
|
}
|
|
132
|
-
if (event.type !== AgentLoopEventType.AgentEnd || !
|
|
132
|
+
if (event.type !== AgentLoopEventType.AgentEnd || !inspectorTurnHadWorkbookWrite)
|
|
133
133
|
return;
|
|
134
|
-
|
|
134
|
+
inspectorTurnHadWorkbookWrite = false;
|
|
135
135
|
if (!isAvailable())
|
|
136
136
|
return;
|
|
137
137
|
const userMessageId = getActiveUserMessageId(event.messages);
|
|
@@ -147,6 +147,19 @@ export function createLocalInspectorRuntime(options, emit) {
|
|
|
147
147
|
configure(enabled) {
|
|
148
148
|
coordinator.configure(enabled);
|
|
149
149
|
},
|
|
150
|
+
run() {
|
|
151
|
+
if (!isAvailable())
|
|
152
|
+
return;
|
|
153
|
+
const messages = options.session.messages;
|
|
154
|
+
const userMessageId = getActiveUserMessageId(messages);
|
|
155
|
+
if (!userMessageId)
|
|
156
|
+
return;
|
|
157
|
+
coordinator.run({
|
|
158
|
+
continuationRunId: userMessageId,
|
|
159
|
+
userMessageId,
|
|
160
|
+
mainContext: { messages: [...messages] }
|
|
161
|
+
});
|
|
162
|
+
},
|
|
150
163
|
dispose() {
|
|
151
164
|
unsubscribeSession();
|
|
152
165
|
coordinator.dispose();
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import type { AgentContextReviewRecommendation, AgentContextReviewTrigger, AgentContextReviewUpdatedEvent,
|
|
1
|
+
import type { AgentContextReviewRecommendation, AgentContextReviewTrigger, AgentContextReviewUpdatedEvent, AgentInspectorUpdatedEvent } from '../../../contracts/agent-api.js';
|
|
2
2
|
import type { AgentModelRegistry } from '../../../contracts/agent-model.js';
|
|
3
3
|
import type { AgentSession } from '../../agent-session.js';
|
|
4
|
-
export type LocalShortyEvent = AgentContextReviewUpdatedEvent |
|
|
4
|
+
export type LocalShortyEvent = AgentContextReviewUpdatedEvent | AgentInspectorUpdatedEvent;
|
|
5
5
|
export type LocalContextReviewDecision = 'apply_requested' | 'closed' | 'dismissed';
|
|
6
6
|
export type LocalShortyEventListener = (event: LocalShortyEvent) => void;
|
|
7
7
|
export interface LocalShortyRuntime {
|
|
8
8
|
subscribe(listener: LocalShortyEventListener): () => void;
|
|
9
9
|
configureInspector(enabled: boolean): void;
|
|
10
|
+
runInspector(): void;
|
|
10
11
|
configureDoctor(enabled: boolean): void;
|
|
11
12
|
runDoctor(trigger: AgentContextReviewTrigger): Promise<void>;
|
|
12
13
|
runAutomaticDoctorIfDue(now?: Date): Promise<boolean>;
|
|
@@ -24,7 +24,7 @@ Deliver professional-grade results with precise calculations, consistent formatt
|
|
|
24
24
|
Beyond spreadsheets, you can interact with external services (email, databases, APIs, etc.). Check your docs and capabilities before telling the user you can't do something
|
|
25
25
|
Current date: ${new Date().toISOString().slice(0, 10)}. Use this as single source of truth for time, overriding pretrained knowledge. Verify recency with tools for time-sensitive facts.
|
|
26
26
|
|
|
27
|
-
Avoid over-interpretation and don't be extra. Only make changes that are directly requested or clearly necessary. Respond in Markdown
|
|
27
|
+
Avoid over-interpretation and don't be extra. Only make changes that are directly requested or clearly necessary. Respond in Markdown
|
|
28
28
|
Keep solutions simple and focused. For example, don't add extra sheets, reformat untouched areas, or make "improvements" beyond what was asked
|
|
29
29
|
Do not add improvements, cleanup, formatting changes, structural edits, or extra analysis beyond what the user asked for.
|
|
30
30
|
Match the scope of your actions to what was actually requested. Complete the requested task, but do not overstep.
|
|
@@ -11,6 +11,7 @@ export { installationAgent } from './installation/agent.js';
|
|
|
11
11
|
export { manageAgent } from './manage/agent.js';
|
|
12
12
|
export { planAgent } from './plan/agent.js';
|
|
13
13
|
export { reviewAgent } from './review/agent.js';
|
|
14
|
+
export { skillForgeAgent } from './skill-forge/agent.js';
|
|
14
15
|
import type { AgentDefinition } from '../agent-definition.js';
|
|
15
16
|
export declare function getModes(): readonly AgentDefinition[];
|
|
16
17
|
export declare function getMode(name: string): AgentDefinition | undefined;
|
package/dist/app/modes/index.js
CHANGED
|
@@ -10,6 +10,7 @@ export { installationAgent } from './installation/agent.js';
|
|
|
10
10
|
export { manageAgent } from './manage/agent.js';
|
|
11
11
|
export { planAgent } from './plan/agent.js';
|
|
12
12
|
export { reviewAgent } from './review/agent.js';
|
|
13
|
+
export { skillForgeAgent } from './skill-forge/agent.js';
|
|
13
14
|
import { isAgentMode, MODE } from '../../mode-names.js';
|
|
14
15
|
import { actionAgent } from './action/agent.js';
|
|
15
16
|
import { askAgent } from './ask/agent.js';
|
|
@@ -18,13 +19,15 @@ import { manageAgent } from './manage/agent.js';
|
|
|
18
19
|
import { MODE_METADATA } from './metadata.js';
|
|
19
20
|
import { planAgent } from './plan/agent.js';
|
|
20
21
|
import { reviewAgent } from './review/agent.js';
|
|
22
|
+
import { skillForgeAgent } from './skill-forge/agent.js';
|
|
21
23
|
const MODE_FACTORIES = {
|
|
22
24
|
[MODE.INSTALLATION]: installationAgent,
|
|
23
25
|
[MODE.ACTION]: actionAgent,
|
|
24
26
|
[MODE.PLAN]: planAgent,
|
|
25
27
|
[MODE.ASK]: askAgent,
|
|
26
28
|
[MODE.MANAGE]: manageAgent,
|
|
27
|
-
[MODE.REVIEW]: reviewAgent
|
|
29
|
+
[MODE.REVIEW]: reviewAgent,
|
|
30
|
+
[MODE.SKILL_FORGE]: skillForgeAgent
|
|
28
31
|
};
|
|
29
32
|
export function getModes() {
|
|
30
33
|
return MODE_METADATA.map((metadata) => {
|
|
@@ -56,7 +56,7 @@ Python 3.13 is shipped as an embedded distribution with Shortcut. No user-instal
|
|
|
56
56
|
|
|
57
57
|
- **Check Python DLLs**: \`ls ${stableXllDir.replace(/\\/g, '/')}/python/python313.dll ${stableXllDir.replace(/\\/g, '/')}/python/python3.dll\`. These live inside the embedded distribution and are loaded dynamically by the XLL. If they are missing, reinstall Shortcut, then try again.
|
|
58
58
|
- **Check embedded Python**: \`"${stableXllDir.replace(/\\/g, '/')}/python/python.exe" --version\`. Should print Python 3.13.x.
|
|
59
|
-
- **Check pip packages**: \`"${stableXllDir.replace(/\\/g, '/')}/python/python.exe" -m pip show pywin32 openpyxl playwright\`. Install Playwright if it is missing using the embedded python.exe.
|
|
59
|
+
- **Check pip packages**: \`"${stableXllDir.replace(/\\/g, '/')}/python/python.exe" -m pip show pywin32 openpyxl playwright\`. Install Playwright if it is missing using the embedded python.exe. If Playwright installation fails, alert the user that it is required for pulling SEC data, but do not block setup or the installed marker.
|
|
60
60
|
|
|
61
61
|
---
|
|
62
62
|
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skill-forge mode agent definition.
|
|
3
|
+
*
|
|
4
|
+
* Launched directly by hosts (native app Skill Forge pane) via
|
|
5
|
+
* `--agent-mode skill-forge`; intentionally absent from interactive mode
|
|
6
|
+
* metadata, like review mode. The ordinary agent loop executes a forge-specific
|
|
7
|
+
* prompt and uses the filesystem as its durable state.
|
|
8
|
+
*/
|
|
9
|
+
import type { AgentDefinition } from '../../agent-definition.js';
|
|
10
|
+
export declare const SKILL_FORGE_AGENT_TOOL_NAMES: ("bash" | "write" | "execute_code" | "execute_tool" | "get_tool_info" | "mcp" | "refresh_context" | "send_message" | "task" | "skill_forge_update_status")[];
|
|
11
|
+
/** Construct the Skill Forge agent definition: tasks in, validated skill out. */
|
|
12
|
+
export declare function skillForgeAgent(): AgentDefinition;
|
|
13
|
+
//# sourceMappingURL=agent.d.ts.map
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skill-forge mode agent definition.
|
|
3
|
+
*
|
|
4
|
+
* Launched directly by hosts (native app Skill Forge pane) via
|
|
5
|
+
* `--agent-mode skill-forge`; intentionally absent from interactive mode
|
|
6
|
+
* metadata, like review mode. The ordinary agent loop executes a forge-specific
|
|
7
|
+
* prompt and uses the filesystem as its durable state.
|
|
8
|
+
*/
|
|
9
|
+
import { MODE } from '../../../mode-names.js';
|
|
10
|
+
import { BASH, EXECUTE_CODE, EXECUTE_TOOL, GET_TOOL_INFO, MCP_TOOL_NAMES, REFRESH_CONTEXT, SEND_MESSAGE, SKILL_FORGE_UPDATE_STATUS, TASK, WRITE } from '../../../tool-names.js';
|
|
11
|
+
import { buildSkillForgePrompt } from './prompt.js';
|
|
12
|
+
export const SKILL_FORGE_AGENT_TOOL_NAMES = [
|
|
13
|
+
BASH,
|
|
14
|
+
WRITE,
|
|
15
|
+
EXECUTE_CODE,
|
|
16
|
+
TASK,
|
|
17
|
+
SEND_MESSAGE,
|
|
18
|
+
REFRESH_CONTEXT,
|
|
19
|
+
GET_TOOL_INFO,
|
|
20
|
+
EXECUTE_TOOL,
|
|
21
|
+
SKILL_FORGE_UPDATE_STATUS,
|
|
22
|
+
...MCP_TOOL_NAMES
|
|
23
|
+
];
|
|
24
|
+
/** Construct the Skill Forge agent definition: tasks in, validated skill out. */
|
|
25
|
+
export function skillForgeAgent() {
|
|
26
|
+
return {
|
|
27
|
+
name: MODE.SKILL_FORGE,
|
|
28
|
+
description: 'Forge a skill with training and validation tasks: run, grade, and refine.',
|
|
29
|
+
systemPrompt: buildSkillForgePrompt(),
|
|
30
|
+
tools: SKILL_FORGE_AGENT_TOOL_NAMES
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=agent.js.map
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/** Skill Forge mode prompt. The agent owns orchestration; files own durable state. */
|
|
2
|
+
import { getEnginePrompts } from '../../prompts/shared-guidelines.js';
|
|
3
|
+
export function buildSkillForgePrompt() {
|
|
4
|
+
// Same engine section the other execute_code-holding modes carry: execution
|
|
5
|
+
// environment rules plus the API reference for the active engine (COM/MOG).
|
|
6
|
+
const engine = getEnginePrompts();
|
|
7
|
+
return `\
|
|
8
|
+
Your name is Shortcut, operating as the Skill Forge. Create a new skill or improve an existing personal skill by running it on real tasks, grading the results, and iterating. Prefer a small working forge over ceremony.
|
|
9
|
+
Current date: ${new Date().toISOString().slice(0, 10)}.
|
|
10
|
+
|
|
11
|
+
==================
|
|
12
|
+
## Provided inputs
|
|
13
|
+
==================
|
|
14
|
+
- New skill: derive a short kebab-case name and clear purpose from the brief, then initialize the draft.
|
|
15
|
+
- Existing skill: read the supplied folder before proposing changes.
|
|
16
|
+
- Grading: use the supplied rubric and check files. Add a programmatic grader only where a deterministic check is meaningful; otherwise grade with a judge subagent against the rubric. Different tasks may use different graders.
|
|
17
|
+
- Goldens: optional parts of tasks, highly desirable. A golden does not replace the rubric; the rubric says which differences matter. Expose goldens to the grader only, never to workers.
|
|
18
|
+
- The rubric defines success. Never invent a numeric bar it does not state. If it is too ambiguous to grade against, ask one focused clarification before training and record the agreed bar in SPEC.md.
|
|
19
|
+
|
|
20
|
+
====================
|
|
21
|
+
## Validation task
|
|
22
|
+
====================
|
|
23
|
+
- Reserve an independent supplied task when one exists.
|
|
24
|
+
- Otherwise synthesize a variant of a training task: same deliverable shape and grader, freshly perturbed inputs (different data, values, and names), authored before refinement so it cannot be shaped around the current draft. Label it synthetic in SPEC.md and in reports.
|
|
25
|
+
- Keep the same validation task across iterations: a stable yardstick beats a fresh one. Its failures may guide refinement — that is what it is for — but never run workers on it during training and never tune the skill against its fixtures directly.
|
|
26
|
+
- Count the revisions that validation failures guided and report the count. A user-supplied validation task is gold: never replace it. Only if the task is synthetic and the count grows past a handful, synthesize one fresh variant and run it once as an untouched final check.
|
|
27
|
+
- Validation is never an intake requirement and never blocks gathering.
|
|
28
|
+
|
|
29
|
+
===============================
|
|
30
|
+
## Self-contained forge folder
|
|
31
|
+
===============================
|
|
32
|
+
Keep durable state under '.shortcut/skill-forge/<skill-name>/'. The folder layout is the specification.
|
|
33
|
+
|
|
34
|
+
- 'SPEC.md': skill name, purpose, each task's role (training or validation), success bar, best iteration, and important decisions
|
|
35
|
+
- 'tasks/<task-name>/': 'TASK.md' plus 'input/' and optional 'golden/'; each task's role (training or validation) is recorded in SPEC.md, not encoded in the folder layout
|
|
36
|
+
- 'grader/': 'RUBRIC.md' plus optional grader programs and supporting files
|
|
37
|
+
- 'draft/': the current mutable skill
|
|
38
|
+
- 'iterations/<N>/': immutable snapshot of what changed in N — the skill, its runs, the grades, and notes
|
|
39
|
+
- 'frontier.json': benchmark runs and the current non-dominated quality, cost, and latency frontier; kept outside iteration snapshots so results append without rewriting history
|
|
40
|
+
|
|
41
|
+
Working rules:
|
|
42
|
+
|
|
43
|
+
- Before each training run, snapshot 'draft/' into the next iteration folder. Tasks and the grader live in one place; changing one is a boundary fix that resets grade comparability, so record it in SPEC.md.
|
|
44
|
+
- Give workers fresh run folders containing only their task and inputs.
|
|
45
|
+
- Never mutate a completed iteration.
|
|
46
|
+
- Keep task-specific programs beside their task or under 'grader/', whichever makes ownership clearest.
|
|
47
|
+
- There is no separate best copy: SPEC.md names the best iteration, and 'iterations/<N>/skill/' is the artifact.
|
|
48
|
+
|
|
49
|
+
==================
|
|
50
|
+
## Skill structure
|
|
51
|
+
==================
|
|
52
|
+
- Progressive disclosure: 'SKILL.md' holds the decisions and workflow the agent needs while working, and must not exceed 300 lines. When it approaches the limit, reorganize or rewrite instead of compressing more rules in.
|
|
53
|
+
- Keep the required name and description in YAML frontmatter. The description says what the skill does and when to use it; keep trigger conditions there, not scattered through the body.
|
|
54
|
+
- 'scripts/': repeated deterministic work. 'references/': detailed knowledge, long examples, and reference material. 'assets/': reusable output materials and templates.
|
|
55
|
+
- Link every supporting resource from 'SKILL.md' and explain when and why to use it.
|
|
56
|
+
- Keep the skill useful beyond the supplied fixtures. When workers repeatedly recreate the same deterministic helper, bundle it once.
|
|
57
|
+
|
|
58
|
+
=======================
|
|
59
|
+
## Improvement judgment
|
|
60
|
+
=======================
|
|
61
|
+
Before changing the draft, classify each failure as one or more of: skill guidance problem, missing reusable resource, worker model limitation, grader or rubric problem, ambiguous task or fixture, transient execution failure. Record the diagnosis and its evidence.
|
|
62
|
+
|
|
63
|
+
- Change the skill only when the evidence points to the skill or a missing skill resource.
|
|
64
|
+
- Fix graders, rubrics, tasks, and fixtures at their own boundary; rerun transient failures before drawing conclusions.
|
|
65
|
+
- A model limitation is benchmark evidence, not automatically a reason to add instructions.
|
|
66
|
+
- Read worker transcripts as well as final outputs: repeated detours, retries, or hand-built helpers reveal weak guidance even when the artifact passes its grader.
|
|
67
|
+
- Generalize from the cause. Never add a fixture-specific exception merely to make one example pass. Prefer deleting or rewriting weak guidance over accumulating rules, and explain why an instruction matters instead of repeating ALWAYS or NEVER.
|
|
68
|
+
|
|
69
|
+
======================
|
|
70
|
+
## Prompt-driven loop
|
|
71
|
+
======================
|
|
72
|
+
1. Inspect: read the supplied target, tasks, rubric, grading files, and any goldens. Ask only about a specific ambiguity that prevents a meaningful run.
|
|
73
|
+
2. Prepare: create the forge folder. Copy an existing skill into 'draft/', or initialize a new one there with a valid 'SKILL.md'.
|
|
74
|
+
3. Train: snapshot the iteration, then spawn one worker per training task, in parallel when practical. Each worker sees only the snapshot skill and its isolated task inputs.
|
|
75
|
+
4. Grade: run each task's grader or judge. Record pass/fail, any rubric score, the reason, and actionable evidence in the iteration folder.
|
|
76
|
+
5. Diagnose and refine: apply the improvement-judgment rules, copy the best snapshot to 'draft/', make only evidence-backed changes, and repeat from Train until the draft meets the success bar in SPEC.md.
|
|
77
|
+
6. Validate: only after training reaches the bar, run the validation task. Its failures may guide refinement; retrain every revision to the bar before validating again, and keep the validation-guided revision count in SPEC.md. If training never reaches the bar, skip validation and record why.
|
|
78
|
+
7. Benchmark: map the final skill's quality, cost, and latency across worker models and thinking levels. Use a fresh task identity for every task under every configuration. Record model, thinking level, task name and identity, pass/fail, any rubric score, tokens, duration, and the observed USD cost from the task result. Persist every run in 'frontier.json' with per-configuration totals and the non-dominated points (a point is dominated only when another configuration is at least as good on all three axes and better on one). Report every non-dominated point; never select an automatic winner.
|
|
79
|
+
8. Finish: record the best iteration in SPEC.md. Report what changed and why, training and validation results (or why validation was not run), every non-dominated frontier point, each configuration's per-task and total observed cost, and the whole forge's worker-task cost by summing 'cost_usd' across task-tool runs — stating these are observed provider-cost estimates that exclude the parent agent, programmatic graders, work outside the task tool, and any billing multipliers. Report limitations and the exact 'iterations/<N>/skill/' path of the best iteration. Offer to install the skill; never install it automatically.
|
|
80
|
+
|
|
81
|
+
Stop when the training bar and any available or requested validation are complete, progress stalls, the user stops the run, or further work needs a new example. With one task in a split, report pass/fail rather than a misleading percentage.
|
|
82
|
+
|
|
83
|
+
================================
|
|
84
|
+
## Worker models and thinking
|
|
85
|
+
================================
|
|
86
|
+
- Accuracy first: iterate with a strong worker (Sol or Opus 5 at high thinking) until the skill reaches its training bar, then map the frontier in Benchmark.
|
|
87
|
+
- Pin one model and thinking level for all workers within an iteration and record the pair in the iteration notes; grades are not comparable across configurations.
|
|
88
|
+
- If the user names the model their skill must serve, train and validate under that model before reporting success.
|
|
89
|
+
|
|
90
|
+
====================
|
|
91
|
+
## Status publishing
|
|
92
|
+
====================
|
|
93
|
+
skill_forge_update_status drives the live forge panel. It is the only progress view the user sees, so a stale status reads as a stalled forge. The forge folder is the source of truth; the status is a small live signal, not storage.
|
|
94
|
+
|
|
95
|
+
- Publish first status as soon as the run starts, then on every ingredient change, every phase transition (validation, benchmarking, and complete included), every landed grade, visible progress in a long phase, and when blocked.
|
|
96
|
+
- Each call replaces the last: ingredient counts, current and best iteration, current training and validation results, and one SHORT status line — under eight words, no semicolons, no per-task inventories.
|
|
97
|
+
- The panel is glanceable. Every detail, number, and explanation belongs in chat messages and the forge folder, not in the status. Keep result notes to a few words or omit them.
|
|
98
|
+
|
|
99
|
+
${engine.apiGuidelines}
|
|
100
|
+
`;
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=prompt.js.map
|
|
@@ -56,12 +56,6 @@
|
|
|
56
56
|
"usedTypes": [],
|
|
57
57
|
"tags": ["action", "ask"]
|
|
58
58
|
},
|
|
59
|
-
"restoreCheckpoint": {
|
|
60
|
-
"signature": "restoreCheckpoint(checkpointId: string): Promise<string>;",
|
|
61
|
-
"docstring": "Restore the workbook to a previous checkpoint state.\nONLY call this if the user EXPLICITLY asks to undo the effects of a code execution and if there is an appropriate checkpoint available.\n@param checkpointId - The checkpoint ID to restore to, e.g. \"exec-abc123\"\n@returns A message indicating success or failure",
|
|
62
|
-
"usedTypes": [],
|
|
63
|
-
"tags": ["hidden", "approval"]
|
|
64
|
-
},
|
|
65
59
|
"fetch": {
|
|
66
60
|
"signature": "fetch(path: string): Promise<string>;",
|
|
67
61
|
"docstring": "Fetch a file from the workspace (shared with bash_command sandbox).\nFiles written by bash to /workspace/{path} are accessible here.\nUse this to read data produced by bash_command without size limits.\n@param path - Relative path within workspace (e.g., \"output.json\", \"report/tables.csv\")\n@returns File contents as a string",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { RuntimeLaunchMode } from '../../mode-names.js';
|
|
1
2
|
export type SessionListProgress = (loaded: number, total: number) => void;
|
|
2
3
|
export interface SessionInfo {
|
|
3
4
|
path: string;
|
|
@@ -16,6 +17,8 @@ export interface SessionInfo {
|
|
|
16
17
|
/** Most recent user message text, absent when the session has no readable messages. */
|
|
17
18
|
lastMessage?: string;
|
|
18
19
|
allMessagesText: string;
|
|
20
|
+
/** Launch mode required to faithfully resume this session, when derivable. */
|
|
21
|
+
launchMode?: RuntimeLaunchMode;
|
|
19
22
|
}
|
|
20
23
|
export declare function buildSessionInfo(filePath: string): Promise<SessionInfo | null>;
|
|
21
24
|
export declare function listSessionsFromDir(dir: string, onProgress?: SessionListProgress, progressOffset?: number, progressTotal?: number): Promise<SessionInfo[]>;
|
|
@@ -41,7 +41,8 @@ export async function buildSessionInfo(filePath) {
|
|
|
41
41
|
messageCount: metadata.messageCount,
|
|
42
42
|
firstMessage: metadata.firstMessage,
|
|
43
43
|
lastMessage: metadata.lastMessage,
|
|
44
|
-
allMessagesText: metadata.allMessagesText ?? ''
|
|
44
|
+
allMessagesText: metadata.allMessagesText ?? '',
|
|
45
|
+
launchMode: metadata.launchMode
|
|
45
46
|
};
|
|
46
47
|
}
|
|
47
48
|
catch {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { MODE } from '../../mode-names.js';
|
|
2
|
+
import { SKILL_FORGE_UPDATE_STATUS } from '../../tool-names.js';
|
|
1
3
|
function isMessageWithContent(message) {
|
|
2
4
|
return (typeof message === 'object' &&
|
|
3
5
|
message !== null &&
|
|
@@ -28,6 +30,7 @@ export function analyzeSessionEntries(entries, { fallbackTimestamp = new Date(0)
|
|
|
28
30
|
let firstMessage;
|
|
29
31
|
let lastMessage;
|
|
30
32
|
let name;
|
|
33
|
+
let launchMode;
|
|
31
34
|
const allMessages = [];
|
|
32
35
|
for (const entry of entries) {
|
|
33
36
|
if (entry.type === 'session_info') {
|
|
@@ -35,6 +38,13 @@ export function analyzeSessionEntries(entries, { fallbackTimestamp = new Date(0)
|
|
|
35
38
|
if (nextName)
|
|
36
39
|
name = nextName;
|
|
37
40
|
}
|
|
41
|
+
// Every agent invocation persists the mode-filtered tool set before the
|
|
42
|
+
// assistant responds. This identifies forge sessions even during initial
|
|
43
|
+
// ingredient gathering, before the agent has published any UI status.
|
|
44
|
+
if (entry.type === 'tool_definitions' &&
|
|
45
|
+
entry.tools.some((tool) => tool.name === SKILL_FORGE_UPDATE_STATUS)) {
|
|
46
|
+
launchMode = MODE.SKILL_FORGE;
|
|
47
|
+
}
|
|
38
48
|
if (entry.type !== 'message')
|
|
39
49
|
continue;
|
|
40
50
|
messageCount += 1;
|
|
@@ -69,6 +79,7 @@ export function analyzeSessionEntries(entries, { fallbackTimestamp = new Date(0)
|
|
|
69
79
|
firstMessage,
|
|
70
80
|
lastMessage: lastMessage ?? firstMessage,
|
|
71
81
|
...(searchText ? { allMessagesText: allMessages.join(' ') } : {}),
|
|
82
|
+
...(launchMode ? { launchMode } : {}),
|
|
72
83
|
messageCount
|
|
73
84
|
};
|
|
74
85
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/** Read-only helpers for host UIs that need saved chats without starting an agent runtime. */
|
|
2
2
|
import type { AgentMessage, ThinkingLevel } from '../../core/core-types.js';
|
|
3
|
+
import type { RuntimeLaunchMode } from '../../mode-names.js';
|
|
3
4
|
import { type SessionInfo } from './session-catalog.js';
|
|
4
5
|
export interface PersistedSessionPreview {
|
|
5
6
|
session: SessionInfo;
|
|
@@ -9,6 +10,8 @@ export interface PersistedSessionPreview {
|
|
|
9
10
|
id: string;
|
|
10
11
|
};
|
|
11
12
|
thinkingLevel?: ThinkingLevel;
|
|
13
|
+
/** Launch mode required to faithfully resume this session, when derivable. */
|
|
14
|
+
launchMode?: RuntimeLaunchMode;
|
|
12
15
|
}
|
|
13
16
|
export declare function readPersistedSession(sessionPath: string, knownSession?: SessionInfo): Promise<PersistedSessionPreview | null>;
|
|
14
17
|
//# sourceMappingURL=session-reader.d.ts.map
|
|
@@ -28,6 +28,7 @@ export async function readPersistedSession(sessionPath, knownSession) {
|
|
|
28
28
|
return {
|
|
29
29
|
session,
|
|
30
30
|
messages: context.messages,
|
|
31
|
+
...(session.launchMode ? { launchMode: session.launchMode } : {}),
|
|
31
32
|
...(hasExistingSession &&
|
|
32
33
|
typeof model?.provider === 'string' &&
|
|
33
34
|
typeof model.modelId === 'string'
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type SubagentSelectableModelRef } from '../../subagent-model-policy.js';
|
|
1
|
+
import { type SubagentModelScope, type SubagentSelectableModelRef } from '../../subagent-model-policy.js';
|
|
2
2
|
export declare const DEFAULT_SUBAGENT_TIMEOUT_SECONDS: number;
|
|
3
3
|
export type TaskModelChoice = SubagentSelectableModelRef;
|
|
4
4
|
export type TaskModelSelection = {
|
|
@@ -16,5 +16,6 @@ export declare function selectTaskModel(input: {
|
|
|
16
16
|
} | undefined;
|
|
17
17
|
readonly overrideModelRef: TaskModelChoice | undefined;
|
|
18
18
|
readonly preferCurrentModelForSubagents: boolean;
|
|
19
|
+
readonly modelScope?: SubagentModelScope;
|
|
19
20
|
}): TaskModelSelection;
|
|
20
21
|
//# sourceMappingURL=defaults.d.ts.map
|
|
@@ -13,7 +13,7 @@ export function selectTaskModel(input) {
|
|
|
13
13
|
modelRef: `${input.parentModel.provider}/${input.parentModel.id}`
|
|
14
14
|
};
|
|
15
15
|
}
|
|
16
|
-
const policy = getSubagentModelPolicy(input.parentModel?.id);
|
|
16
|
+
const policy = getSubagentModelPolicy(input.parentModel?.id, input.modelScope);
|
|
17
17
|
const overrideModel = policy.allowedModels.find((model) => model.ref === input.overrideModelRef);
|
|
18
18
|
if (input.overrideModelRef && !overrideModel) {
|
|
19
19
|
return {
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skill Forge status tool. Durable forge state remains in the forge folder;
|
|
3
|
+
* this publishes only the small current-status projection needed by hosts.
|
|
4
|
+
*/
|
|
5
|
+
import { skillForgeStateSchema } from '../../contracts/agent-skill-forge.js';
|
|
6
|
+
import type { ToolDefinition } from '../../core/core-types.js';
|
|
7
|
+
import type { SkillForgeStateManager } from '../../core/skill-forge/index.js';
|
|
8
|
+
export declare function createSkillForgeStatusTool(manager: SkillForgeStateManager): ToolDefinition<typeof skillForgeStateSchema>;
|
|
9
|
+
//# sourceMappingURL=skill-forge.d.ts.map
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Skill Forge status tool. Durable forge state remains in the forge folder;
|
|
3
|
+
* this publishes only the small current-status projection needed by hosts.
|
|
4
|
+
*/
|
|
5
|
+
import { skillForgeStateSchema } from '../../contracts/agent-skill-forge.js';
|
|
6
|
+
import { SKILL_FORGE_UPDATE_STATUS } from '../../tool-names.js';
|
|
7
|
+
const TOOL_DESCRIPTION = `\
|
|
8
|
+
Publish the current Skill Forge status to the host UI — the live panel the user watches; a stale status reads as a stalled forge. Call this first thing when a run starts, at every phase transition, and after ingredient changes, grades, visible progress within long phases, and blockers. The forge folder is the source of truth. Each call replaces the previous status; include the complete small status object, never task definitions or history.`;
|
|
9
|
+
export function createSkillForgeStatusTool(manager) {
|
|
10
|
+
return {
|
|
11
|
+
name: SKILL_FORGE_UPDATE_STATUS,
|
|
12
|
+
label: 'Skill Forge',
|
|
13
|
+
isReadOnly: false,
|
|
14
|
+
description: TOOL_DESCRIPTION,
|
|
15
|
+
parameters: skillForgeStateSchema,
|
|
16
|
+
async execute(_toolCallId, params) {
|
|
17
|
+
manager.set(params);
|
|
18
|
+
const progress = params.iteration ? `, iteration ${params.iteration}` : '';
|
|
19
|
+
const text = `Forge status published: ${params.skillName} — ${params.phase}${progress}.`;
|
|
20
|
+
return { content: [{ type: 'text', text }], details: undefined };
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=skill-forge.js.map
|