shortcutxl 0.3.87 → 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.
Files changed (155) hide show
  1. package/BINARY-INVENTORY.json +13 -13
  2. package/CHANGELOG.md +10 -0
  3. package/dist/app/agent-session-runtime-adapter.js +4 -1
  4. package/dist/app/background-agents/shorty/fix-prompts.d.ts +2 -2
  5. package/dist/app/background-agents/shorty/inspector/runtime.d.ts +1 -0
  6. package/dist/app/background-agents/shorty/inspector/runtime.js +25 -12
  7. package/dist/app/background-agents/shorty/runtime.js +3 -0
  8. package/dist/app/background-agents/shorty/types.d.ts +3 -2
  9. package/dist/app/modes/action/prompt.js +1 -1
  10. package/dist/app/modes/index.d.ts +1 -0
  11. package/dist/app/modes/index.js +4 -1
  12. package/dist/app/modes/installation/prompt-windows.js +1 -1
  13. package/dist/app/modes/skill-forge/agent.d.ts +13 -0
  14. package/dist/app/modes/skill-forge/agent.js +33 -0
  15. package/dist/app/modes/skill-forge/prompt.d.ts +3 -0
  16. package/dist/app/modes/skill-forge/prompt.js +102 -0
  17. package/dist/app/prompts/spreadjs-api-reference.json +0 -6
  18. package/dist/app/session/session-catalog.d.ts +3 -0
  19. package/dist/app/session/session-catalog.js +2 -1
  20. package/dist/app/session/session-metadata.js +11 -0
  21. package/dist/app/session/session-reader.d.ts +3 -0
  22. package/dist/app/session/session-reader.js +1 -0
  23. package/dist/app/subagents/defaults.d.ts +2 -1
  24. package/dist/app/subagents/defaults.js +1 -1
  25. package/dist/app/tools/skill-forge.d.ts +9 -0
  26. package/dist/app/tools/skill-forge.js +24 -0
  27. package/dist/app/tools/task/manager.js +2 -1
  28. package/dist/app/tools/task/task.d.ts +3 -0
  29. package/dist/app/tools/task/task.js +31 -9
  30. package/dist/cli.js +892 -259
  31. package/dist/constants.d.ts +2 -0
  32. package/dist/constants.js +4 -0
  33. package/dist/contracts/agent-api.d.ts +31 -25
  34. package/dist/contracts/agent-api.js +17 -13
  35. package/dist/contracts/agent-execute-code.d.ts +0 -2
  36. package/dist/contracts/agent-execute-code.js +0 -2
  37. package/dist/contracts/agent-session-store.d.ts +3 -0
  38. package/dist/contracts/agent-skill-forge.d.ts +67 -0
  39. package/dist/contracts/agent-skill-forge.js +53 -0
  40. package/dist/core/embedded-agent-facade.d.ts +2 -1
  41. package/dist/core/embedded-agent-facade.js +5 -2
  42. package/dist/core/pending-host-tool-requests.d.ts +1 -1
  43. package/dist/core/pending-host-tool-requests.js +1 -1
  44. package/dist/core/prompts/agent-guidelines.d.ts +3 -3
  45. package/dist/core/prompts/agent-guidelines.js +23 -14
  46. package/dist/core/skill-forge/index.d.ts +3 -0
  47. package/dist/core/skill-forge/index.js +3 -0
  48. package/dist/core/skill-forge/skill-forge-state-manager.d.ts +20 -0
  49. package/dist/core/skill-forge/skill-forge-state-manager.js +39 -0
  50. package/dist/credits/shortcut-credits.d.ts +15 -0
  51. package/dist/credits/shortcut-credits.js +53 -0
  52. package/dist/embedded-agent/ai-invoke.d.ts +1 -1
  53. package/dist/embedded-agent/ai-invoke.js +6 -5
  54. package/dist/embedded-agent/compose.js +53 -37
  55. package/dist/embedded-agent/host-runtime-options.d.ts +1 -1
  56. package/dist/embedded-agent/host-runtime-options.js +12 -13
  57. package/dist/embedded-agent/host-tools/execute-bash-command/contract.js +4 -2
  58. package/dist/embedded-agent/host-tools/execute-code/allowed-functions.json +0 -2
  59. package/dist/embedded-agent/host-tools/execute-code/classify.d.ts +1 -3
  60. package/dist/embedded-agent/host-tools/execute-code/classify.js +4 -7
  61. package/dist/embedded-agent/host-tools/execute-code/contract.d.ts +0 -1
  62. package/dist/embedded-agent/host-tools/execute-code/contract.js +0 -1
  63. package/dist/embedded-agent/host-tools/mode-host-tools.js +0 -6
  64. package/dist/embedded-agent/host-tools/switch-mode/contract.d.ts +2 -2
  65. package/dist/embedded-agent/host-tools/switch-mode/contract.js +1 -2
  66. package/dist/embedded-agent/index.d.ts +3 -3
  67. package/dist/embedded-agent/inspector/agent.d.ts +14 -0
  68. package/dist/embedded-agent/{review → inspector}/agent.js +14 -7
  69. package/dist/embedded-agent/{review → inspector}/coordinator.d.ts +17 -11
  70. package/dist/embedded-agent/{review → inspector}/coordinator.js +49 -29
  71. package/dist/embedded-agent/inspector/findings.d.ts +7 -0
  72. package/dist/embedded-agent/{review → inspector}/findings.js +9 -9
  73. package/dist/embedded-agent/prompt/build.js +0 -10
  74. package/dist/embedded-agent/prompt/modes/action.js +1 -1
  75. package/dist/embedded-agent/prompt/modes/ask.js +1 -1
  76. package/dist/embedded-agent/suggestions.js +2 -1
  77. package/dist/embedded-agent/worker-bridge/dispatch.js +7 -4
  78. package/dist/embedded-agent/worker-bridge/host-client.d.ts +3 -1
  79. package/dist/embedded-agent/worker-bridge/host-client.js +31 -14
  80. package/dist/endpoints.d.ts +1 -0
  81. package/dist/endpoints.js +1 -0
  82. package/dist/main.d.ts +4 -1
  83. package/dist/main.js +73 -40
  84. package/dist/mode-names.d.ts +5 -0
  85. package/dist/mode-names.js +4 -2
  86. package/dist/rpc/index.d.ts +1 -1
  87. package/dist/rpc/rpc-client.d.ts +7 -0
  88. package/dist/rpc/rpc-client.js +2 -1
  89. package/dist/rpc/rpc-host.d.ts +30 -1
  90. package/dist/rpc/rpc-host.js +129 -25
  91. package/dist/rpc/rpc-mode.d.ts +1 -1
  92. package/dist/rpc/rpc-types.d.ts +21 -2
  93. package/dist/shell/components/shorty-issues.d.ts +3 -3
  94. package/dist/shell/components/shorty-issues.js +5 -5
  95. package/dist/shell/interactive/interactive-mode.js +11 -11
  96. package/dist/startup/startup-progress.d.ts +62 -0
  97. package/dist/startup/startup-progress.js +92 -0
  98. package/dist/subagent-model-policy.d.ts +12 -2
  99. package/dist/subagent-model-policy.js +37 -2
  100. package/dist/subagent-thinking-policy.d.ts +5 -3
  101. package/dist/subagent-thinking-policy.js +5 -4
  102. package/dist/tool-names.d.ts +1 -0
  103. package/dist/tool-names.js +1 -0
  104. package/native-app/main/index.js +41 -8
  105. package/native-app/package.json +1 -1
  106. package/native-app/renderer/assets/Alegreya-Italic-Variable-BNGsTFBD.woff2 +0 -0
  107. package/native-app/renderer/assets/Alegreya-Variable-BCUEsrKK.woff2 +0 -0
  108. package/native-app/renderer/assets/AvQest-DwQOLw3s.woff2 +0 -0
  109. package/native-app/renderer/assets/Cinzel-Variable-BOqWLKHx.woff2 +0 -0
  110. package/native-app/renderer/assets/DiabloHeavy-aRIenZkJ.woff2 +0 -0
  111. package/native-app/renderer/assets/anvil-BULXnOOB.png +3 -0
  112. package/native-app/renderer/assets/frame-DDQ6ScMl.png +3 -0
  113. package/native-app/renderer/assets/{index-Ch24bXR6.css → index-DsYjsaRU.css} +1580 -173
  114. package/native-app/renderer/assets/{index-BRbc7n0z.js → index-SuRESuDS.js} +4414 -374
  115. package/native-app/renderer/assets/plaque-C6n7SCaF.png +3 -0
  116. package/native-app/renderer/assets/rock-CXFUiLgi.png +3 -0
  117. package/native-app/renderer/index.html +2 -2
  118. package/package.json +6 -2
  119. package/skills/skill-creator/SKILL.md +89 -440
  120. package/user-docs/dist/index.html +1 -1
  121. package/xll/python/Lib/site-packages/httpx-0.28.1.dist-info/RECORD +1 -1
  122. package/xll/python/Lib/site-packages/idna-3.18.dist-info/RECORD +1 -1
  123. package/xll/python/Lib/site-packages/pip-26.2.dist-info/RECORD +3 -3
  124. package/xll/python/Lib/site-packages/pywin32-311.dist-info/RECORD +2 -2
  125. package/xll/python/Scripts/httpx.exe +0 -0
  126. package/xll/python/Scripts/idna.exe +0 -0
  127. package/xll/python/Scripts/pip.exe +0 -0
  128. package/xll/python/Scripts/pip3.13.exe +0 -0
  129. package/xll/python/Scripts/pip3.exe +0 -0
  130. package/xll/python/Scripts/pywin32_postinstall.exe +0 -0
  131. package/xll/python/Scripts/pywin32_testall.exe +0 -0
  132. package/dist/embedded-agent/prompt/modes/shorty.d.ts +0 -12
  133. package/dist/embedded-agent/prompt/modes/shorty.js +0 -35
  134. package/dist/embedded-agent/review/agent.d.ts +0 -14
  135. package/dist/embedded-agent/review/findings.d.ts +0 -7
  136. package/dist/startup/timings.d.ts +0 -7
  137. package/dist/startup/timings.js +0 -25
  138. package/native-app/renderer/assets/shortcutagent-DxFsGSkw.png +0 -0
  139. package/skills/skill-creator/LICENSE.txt +0 -202
  140. package/skills/skill-creator/agents/analyzer.md +0 -274
  141. package/skills/skill-creator/agents/comparator.md +0 -202
  142. package/skills/skill-creator/agents/grader.md +0 -223
  143. package/skills/skill-creator/assets/eval_review.html +0 -292
  144. package/skills/skill-creator/eval-viewer/generate_review.py +0 -471
  145. package/skills/skill-creator/eval-viewer/viewer.html +0 -1478
  146. package/skills/skill-creator/references/schemas.md +0 -430
  147. package/skills/skill-creator/scripts/__init__.py +0 -0
  148. package/skills/skill-creator/scripts/aggregate_benchmark.py +0 -401
  149. package/skills/skill-creator/scripts/generate_report.py +0 -326
  150. package/skills/skill-creator/scripts/improve_description.py +0 -232
  151. package/skills/skill-creator/scripts/package_skill.py +0 -136
  152. package/skills/skill-creator/scripts/quick_validate.py +0 -103
  153. package/skills/skill-creator/scripts/run_eval.py +0 -223
  154. package/skills/skill-creator/scripts/run_loop.py +0 -324
  155. package/skills/skill-creator/scripts/utils.py +0 -47
@@ -345,13 +345,14 @@ function writeTaskOutput(task) {
345
345
  export function formatTaskNotification(task) {
346
346
  const durationMs = task.completedAt ? Math.max(0, task.completedAt - task.startedAt) : 0;
347
347
  const totalTokens = (task.usage?.input ?? 0) + (task.usage?.output ?? 0);
348
+ const costUsd = (task.usage?.cost ?? 0).toFixed(8);
348
349
  const outputPreview = truncateForParent(task.errorMessage ?? task.resultText ?? '(no output)');
349
350
  const lines = [
350
351
  `<sa status="${escapeXmlAttribute(task.status)}" type="${escapeXmlAttribute(task.subagentType)}" name="${escapeXmlAttribute(task.name || task.agentId)}" id="${escapeXmlAttribute(task.agentId)}">`,
351
352
  ` <prompt>${escapeXmlText(task.prompt)}</prompt>`,
352
353
  ` <output>${escapeXmlText(outputPreview)}</output>`,
353
354
  ` <files output="${escapeXmlAttribute(task.outputFile)}" output_chars="${task.outputFileChars ?? 0}" output_lines="${task.outputFileLines ?? 0}"${task.transcriptFile ? ` transcript="${escapeXmlAttribute(task.transcriptFile)}"` : ''}/>`,
354
- ` <usage tokens="${totalTokens}" tools="${task.toolUses}" ms="${durationMs}"/>`,
355
+ ` <usage tokens="${totalTokens}" tools="${task.toolUses}" ms="${durationMs}" cost_usd="${costUsd}"/>`,
355
356
  '</sa>'
356
357
  ];
357
358
  return lines.join('\n');
@@ -10,6 +10,7 @@
10
10
  */
11
11
  import type { ToolDefinition } from '../../../core/core-types.js';
12
12
  import { type RuntimePermissionPolicy } from '../../../core/permission-policy.js';
13
+ import { type SubagentModelScope } from '../../../subagent-model-policy.js';
13
14
  import { type TaskModelChoice } from '../../subagents/defaults.js';
14
15
  import { type TaskManager } from './manager.js';
15
16
  import { type TaskSubagentResult } from './types.js';
@@ -48,6 +49,8 @@ interface CreateTaskToolOptions {
48
49
  readonly provider: string;
49
50
  readonly id: string;
50
51
  } | undefined;
52
+ /** Live model-policy scope; defaults to deriving it from the current mode. Tests inject it. */
53
+ getModelScope?: () => SubagentModelScope;
51
54
  }
52
55
  /** Build the child runtime tool catalog by replacing the task tool with a scoped clone. */
53
56
  export declare function buildChildRuntimeTools(tools: readonly ToolDefinition[], options: {
@@ -13,7 +13,8 @@ import { randomUUID } from 'node:crypto';
13
13
  import { StringEnum } from '../../../ai/typebox.js';
14
14
  import { RUNTIME_CAPABILITY } from '../../../core/permission-policy.js';
15
15
  import { getActiveUserMessageId } from '../../../core/user-message-id.js';
16
- import { getSubagentModelOverrideGuidance, getSubagentModelPolicy } from '../../../subagent-model-policy.js';
16
+ import { getCurrentMode, MODE } from '../../../mode-names.js';
17
+ import { getSubagentModelOverrideGuidance, getSubagentModelPolicy, SUBAGENT_MODEL_SCOPE } from '../../../subagent-model-policy.js';
17
18
  import { resolveSubagentThinkingLevel } from '../../../subagent-thinking-policy.js';
18
19
  import { MCP_TOOL_NAMES, TASK } from '../../../tool-names.js';
19
20
  import { ABORT_AGENT_MESSAGE } from '../../../utils/abort.js';
@@ -117,11 +118,16 @@ export function buildInheritedSubagentPermissionPolicy(input) {
117
118
  export function getSubagentDisplayError(result) {
118
119
  return result.errorMessage || result.text || '(subagent failed with no output)';
119
120
  }
121
+ const SUBAGENT_THINKING_LEVELS = [
122
+ 'low',
123
+ 'medium',
124
+ 'high'
125
+ ];
120
126
  /** Build the typebox schema for the task tool, optionally excluding subagent types. */
121
- function buildSchema(excludeSubagents, parentModelId, preferCurrentModelForSubagents, subagentModel) {
127
+ function buildSchema(excludeSubagents, parentModelId, preferCurrentModelForSubagents, subagentModel, modelScope) {
122
128
  const allNames = getSubagentNames();
123
129
  const names = excludeSubagents ? allNames.filter((n) => !excludeSubagents.includes(n)) : allNames;
124
- const modelPolicy = getSubagentModelPolicy(parentModelId);
130
+ const modelPolicy = getSubagentModelPolicy(parentModelId, modelScope);
125
131
  const modelChoices = preferCurrentModelForSubagents || subagentModel
126
132
  ? []
127
133
  : modelPolicy.allowedModels.map((model) => model.ref);
@@ -141,7 +147,14 @@ function buildSchema(excludeSubagents, parentModelId, preferCurrentModelForSubag
141
147
  ...(modelChoices.length > 1
142
148
  ? {
143
149
  model: Type.Optional(StringEnum(modelChoices, {
144
- description: `Optional override. Omit to use "${modelPolicy.defaultModel.ref}". ${getSubagentModelOverrideGuidance(parentModelId)}`
150
+ description: `Optional override. Omit to use "${modelPolicy.defaultModel.ref}". ${getSubagentModelOverrideGuidance(parentModelId, modelScope)}`
151
+ }))
152
+ }
153
+ : {}),
154
+ ...(modelScope === SUBAGENT_MODEL_SCOPE.SKILL_FORGE
155
+ ? {
156
+ thinking_level: Type.Optional(StringEnum(SUBAGENT_THINKING_LEVELS, {
157
+ description: 'Optional reasoning-effort override for this worker. Pin one level per iteration so grades stay comparable. Luna and Pivot always run at max regardless of this value.'
145
158
  }))
146
159
  }
147
160
  : {}),
@@ -177,15 +190,20 @@ function getMissingDeclaredTools(declaredToolNames, runtimeTools) {
177
190
  }
178
191
  /** Build the `task` tool that spawns subagents in the foreground or background. */
179
192
  export function createTaskTool(options = {}) {
180
- const { cwd: cwdOverride, excludeSubagents, getRuntimeTools, notifyParent, disableMemory, preferCurrentModelForSubagents, subagentModel, parentModel, getCurrentModel, taskManager = defaultTaskManager } = options;
193
+ const { cwd: cwdOverride, excludeSubagents, getRuntimeTools, notifyParent, disableMemory, preferCurrentModelForSubagents, subagentModel, parentModel, getCurrentModel, getModelScope, taskManager = defaultTaskManager } = options;
181
194
  let parametersCache;
182
195
  const getActiveParentModel = () => getCurrentModel?.() ?? parentModel;
196
+ const getActiveModelScope = () => getModelScope?.() ??
197
+ (getCurrentMode() === MODE.SKILL_FORGE
198
+ ? SUBAGENT_MODEL_SCOPE.SKILL_FORGE
199
+ : SUBAGENT_MODEL_SCOPE.DEFAULT);
183
200
  const getParameters = () => {
184
201
  const activeParentModel = getActiveParentModel();
185
- const key = `${activeParentModel?.id ?? ''}\0${preferCurrentModelForSubagents === true}\0${subagentModel ?? ''}`;
202
+ const modelScope = getActiveModelScope();
203
+ const key = `${activeParentModel?.id ?? ''}\0${preferCurrentModelForSubagents === true}\0${subagentModel ?? ''}\0${modelScope}`;
186
204
  if (parametersCache?.key === key)
187
205
  return parametersCache.schema;
188
- const schema = buildSchema(excludeSubagents, activeParentModel?.id, preferCurrentModelForSubagents === true, subagentModel);
206
+ const schema = buildSchema(excludeSubagents, activeParentModel?.id, preferCurrentModelForSubagents === true, subagentModel, modelScope);
189
207
  parametersCache = { key, schema };
190
208
  return schema;
191
209
  };
@@ -197,7 +215,7 @@ export function createTaskTool(options = {}) {
197
215
  return getParameters();
198
216
  },
199
217
  async execute(toolCallId, params, signal, onUpdate, ctx) {
200
- const { subagent_type, name, query: rawQuery, query_file: queryFile, model: modelOverride, run_in_background } = params;
218
+ const { subagent_type, name, query: rawQuery, query_file: queryFile, model: modelOverride, thinking_level: thinkingOverride, run_in_background } = params;
201
219
  const effectiveRunInBackground = run_in_background === true;
202
220
  // Look up agent config
203
221
  const agentConfig = getSubagent(subagent_type);
@@ -261,6 +279,7 @@ export function createTaskTool(options = {}) {
261
279
  const extCtx = ctx;
262
280
  const activeParentModel = extCtx.model ?? getActiveParentModel();
263
281
  const modelSelection = selectTaskModel({
282
+ modelScope: getActiveModelScope(),
264
283
  parentModel: activeParentModel,
265
284
  overrideModelRef: subagentModel ?? modelOverride,
266
285
  preferCurrentModelForSubagents: preferCurrentModelForSubagents === true && subagentModel === undefined
@@ -281,7 +300,10 @@ export function createTaskTool(options = {}) {
281
300
  ...agentConfig,
282
301
  thinkingLevel: resolveSubagentThinkingLevel({
283
302
  modelId: modelSelection.modelId,
284
- declaredLevel: agentConfig.thinkingLevel
303
+ declaredLevel: agentConfig.thinkingLevel,
304
+ requestedLevel: getActiveModelScope() === SUBAGENT_MODEL_SCOPE.SKILL_FORGE
305
+ ? thinkingOverride
306
+ : undefined
285
307
  })
286
308
  };
287
309
  const effectiveModel = modelSelection.modelRef;