@vionwilliams/agent-os 1.0.0-alpha.23 → 1.0.0-alpha.25
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/README.md +2 -2
- package/dist/cli.js +415 -109
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
> 智能任务通用工作系统 · 多模型路由 + 意图编排 + 多智能体协调 + DataHub + 可编程面板 + LLM 知识编译器
|
|
4
4
|
|
|
5
|
-
**Status**: `1.0.0-alpha.
|
|
5
|
+
**Status**: `1.0.0-alpha.25` · Beta 测试版 · npm 公共包可用
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
@@ -64,7 +64,7 @@ bash install-agent-os-mac.sh
|
|
|
64
64
|
agent-os --version
|
|
65
65
|
```
|
|
66
66
|
|
|
67
|
-
成功时会显示 `1.0.0-alpha.
|
|
67
|
+
成功时会显示 `1.0.0-alpha.25 (Agent-OS)` 或更新版本。
|
|
68
68
|
|
|
69
69
|
然后打开 Agent-OS:
|
|
70
70
|
|
package/dist/cli.js
CHANGED
|
@@ -93314,7 +93314,7 @@ var init_system = __esm(() => {
|
|
|
93314
93314
|
AGENT_SDK_CLAUDE_CODE_PRESET_PREFIX,
|
|
93315
93315
|
AGENT_SDK_PREFIX
|
|
93316
93316
|
];
|
|
93317
|
-
AGENT_OS_VERSION = typeof MACRO !== "undefined" ? "1.0.0-alpha.
|
|
93317
|
+
AGENT_OS_VERSION = typeof MACRO !== "undefined" ? "1.0.0-alpha.25" : "dev";
|
|
93318
93318
|
CLI_SYSPROMPT_PREFIXES = new Set(CLI_SYSPROMPT_PREFIX_VALUES);
|
|
93319
93319
|
});
|
|
93320
93320
|
|
|
@@ -93758,7 +93758,7 @@ function getClaudeCodeUserAgent() {
|
|
|
93758
93758
|
}
|
|
93759
93759
|
var AGENT_OS_VERSION2;
|
|
93760
93760
|
var init_userAgent = __esm(() => {
|
|
93761
|
-
AGENT_OS_VERSION2 = typeof MACRO !== "undefined" ? "1.0.0-alpha.
|
|
93761
|
+
AGENT_OS_VERSION2 = typeof MACRO !== "undefined" ? "1.0.0-alpha.25" : "dev";
|
|
93762
93762
|
});
|
|
93763
93763
|
|
|
93764
93764
|
// src/utils/http.ts
|
|
@@ -93839,7 +93839,7 @@ var init_http2 = __esm(() => {
|
|
|
93839
93839
|
init_auth();
|
|
93840
93840
|
init_userAgent();
|
|
93841
93841
|
init_workloadContext();
|
|
93842
|
-
AGENT_OS_VERSION3 = typeof MACRO !== "undefined" ? "1.0.0-alpha.
|
|
93842
|
+
AGENT_OS_VERSION3 = typeof MACRO !== "undefined" ? "1.0.0-alpha.25" : "dev";
|
|
93843
93843
|
});
|
|
93844
93844
|
|
|
93845
93845
|
// src/services/api/router/userProviders.ts
|
|
@@ -108404,11 +108404,13 @@ var WEB_FETCH_TOOL_NAME = "WebFetch", DESCRIPTION2 = `
|
|
|
108404
108404
|
|
|
108405
108405
|
Usage notes:
|
|
108406
108406
|
- IMPORTANT: If an MCP-provided web fetch tool is available, prefer using that tool instead of this one, as it may have fewer restrictions.
|
|
108407
|
+
- For market research or other current-public-data tasks, use WebSearch first to find current accessible URLs, then use WebFetch only on URLs that look valid.
|
|
108407
108408
|
- The URL must be a fully-formed valid URL
|
|
108408
108409
|
- HTTP URLs will be automatically upgraded to HTTPS
|
|
108409
108410
|
- The prompt should describe what information you want to extract from the page
|
|
108410
108411
|
- This tool is read-only and does not modify any files
|
|
108411
108412
|
- Results may be summarized if the content is very large
|
|
108413
|
+
- Public web pages can expire, redirect, block automation, or time out. When WebFetch returns ok:false, treat that source as unavailable, use the recoveryHint, and continue with other sources instead of stopping the task.
|
|
108412
108414
|
- Includes a self-cleaning 15-minute cache for faster responses when repeatedly accessing the same URL
|
|
108413
108415
|
- When a URL redirects to a different host, the tool will inform you and provide the redirect URL in a special format. You should then make a new WebFetch request with the redirect URL to fetch the content.
|
|
108414
108416
|
- For GitHub URLs, prefer using the gh CLI via Bash instead (e.g., gh pr view, gh issue view, gh api).
|
|
@@ -207175,7 +207177,7 @@ var init_sessionStorage = __esm(() => {
|
|
|
207175
207177
|
init_settings2();
|
|
207176
207178
|
init_slowOperations();
|
|
207177
207179
|
init_uuid();
|
|
207178
|
-
VERSION4 = typeof MACRO !== "undefined" ? "1.0.0-alpha.
|
|
207180
|
+
VERSION4 = typeof MACRO !== "undefined" ? "1.0.0-alpha.25" : "unknown";
|
|
207179
207181
|
MAX_TOMBSTONE_REWRITE_BYTES = 50 * 1024 * 1024;
|
|
207180
207182
|
SKIP_FIRST_PROMPT_PATTERN = /^(?:\s*<[a-z][\w-]*[\s>]|\[Request interrupted by user[^\]]*\])/;
|
|
207181
207183
|
EPHEMERAL_PROGRESS_TYPES = new Set([
|
|
@@ -207305,7 +207307,7 @@ function Feedback({
|
|
|
207305
207307
|
platform: env3.platform,
|
|
207306
207308
|
gitRepo: envInfo.isGit,
|
|
207307
207309
|
terminal: env3.terminal,
|
|
207308
|
-
version: "1.0.0-alpha.
|
|
207310
|
+
version: "1.0.0-alpha.25",
|
|
207309
207311
|
transcript: normalizeMessagesForAPI(messages),
|
|
207310
207312
|
errors: sanitizedErrors,
|
|
207311
207313
|
lastApiRequest: getLastAPIRequest(),
|
|
@@ -207489,7 +207491,7 @@ function Feedback({
|
|
|
207489
207491
|
", ",
|
|
207490
207492
|
env3.terminal,
|
|
207491
207493
|
", v",
|
|
207492
|
-
"1.0.0-alpha.
|
|
207494
|
+
"1.0.0-alpha.25"
|
|
207493
207495
|
]
|
|
207494
207496
|
})
|
|
207495
207497
|
]
|
|
@@ -207595,7 +207597,7 @@ ${sanitizedDescription}
|
|
|
207595
207597
|
` + `**Environment Info**
|
|
207596
207598
|
` + `- Platform: ${env3.platform}
|
|
207597
207599
|
` + `- Terminal: ${env3.terminal}
|
|
207598
|
-
` + `- Version: ${"1.0.0-alpha.
|
|
207600
|
+
` + `- Version: ${"1.0.0-alpha.25"}
|
|
207599
207601
|
` + `- Feedback ID: ${feedbackId}
|
|
207600
207602
|
` + `
|
|
207601
207603
|
**Errors**
|
|
@@ -259980,8 +259982,8 @@ var init_toolAnalytics = __esm(() => {
|
|
|
259980
259982
|
init_agentContext();
|
|
259981
259983
|
init_slowOperations();
|
|
259982
259984
|
init_teammate();
|
|
259983
|
-
AGENT_OS_VERSION4 = typeof MACRO !== "undefined" ? "1.0.0-alpha.
|
|
259984
|
-
AGENT_OS_BUILD_TIME = typeof MACRO !== "undefined" ? "2026-05-
|
|
259985
|
+
AGENT_OS_VERSION4 = typeof MACRO !== "undefined" ? "1.0.0-alpha.25" : "dev";
|
|
259986
|
+
AGENT_OS_BUILD_TIME = typeof MACRO !== "undefined" ? "2026-05-21T15:45:55Z" : undefined;
|
|
259985
259987
|
BUILTIN_MCP_SERVER_NAMES = new Set([]);
|
|
259986
259988
|
TOOL_INPUT_MAX_JSON_CHARS = 4 * 1024;
|
|
259987
259989
|
FILE_COMMANDS = new Set([
|
|
@@ -262593,7 +262595,8 @@ function formatInputValidationSummary(error41) {
|
|
|
262593
262595
|
`).map((line) => line.trim()).filter(Boolean);
|
|
262594
262596
|
const firstLine = lines2[0] ?? "";
|
|
262595
262597
|
const toolMatch = firstLine.match(/^InputValidationError:\s+(.+?)\s+failed\b/);
|
|
262596
|
-
const
|
|
262598
|
+
const toolName = toolMatch?.[1];
|
|
262599
|
+
const prefix = toolName && /^Task(Create|Update)$/.test(toolName) ? `${toolName} parameters do not match the task schema. Agent-OS tried safe normalization; retry with the fields below.` : toolName ? `${toolName} parameters do not match the current schema. Retry with the fields below.` : "Tool parameters do not match the current schema. Retry with the fields below.";
|
|
262597
262600
|
const details = lines2.filter((line) => line.startsWith("The required parameter") || line.startsWith("An unexpected parameter")).slice(0, 4);
|
|
262598
262601
|
return [prefix, ...details].join(`
|
|
262599
262602
|
`);
|
|
@@ -274627,7 +274630,7 @@ function getInstallationEnv() {
|
|
|
274627
274630
|
return;
|
|
274628
274631
|
}
|
|
274629
274632
|
function getClaudeCodeVersion() {
|
|
274630
|
-
return "1.0.0-alpha.
|
|
274633
|
+
return "1.0.0-alpha.25";
|
|
274631
274634
|
}
|
|
274632
274635
|
async function getInstalledVSCodeExtensionVersion(command) {
|
|
274633
274636
|
const { stdout } = await execFileNoThrow(command, ["--list-extensions", "--show-versions"], {
|
|
@@ -297345,7 +297348,7 @@ async function setupSdkMcpClients(sdkMcpConfigs, sendMcpMessage) {
|
|
|
297345
297348
|
const client = new Client({
|
|
297346
297349
|
name: "claude-code",
|
|
297347
297350
|
title: "Agent-OS",
|
|
297348
|
-
version: "1.0.0-alpha.
|
|
297351
|
+
version: "1.0.0-alpha.25",
|
|
297349
297352
|
description: "Anthropic's agentic coding tool",
|
|
297350
297353
|
websiteUrl: PRODUCT_URL
|
|
297351
297354
|
}, {
|
|
@@ -297698,7 +297701,7 @@ var init_client4 = __esm(() => {
|
|
|
297698
297701
|
const client = new Client({
|
|
297699
297702
|
name: "claude-code",
|
|
297700
297703
|
title: "Agent-OS",
|
|
297701
|
-
version: "1.0.0-alpha.
|
|
297704
|
+
version: "1.0.0-alpha.25",
|
|
297702
297705
|
description: "Anthropic's agentic coding tool",
|
|
297703
297706
|
websiteUrl: PRODUCT_URL
|
|
297704
297707
|
}, {
|
|
@@ -344508,8 +344511,10 @@ __export(exports_utils2, {
|
|
|
344508
344511
|
getURLMarkdownContent: () => getURLMarkdownContent,
|
|
344509
344512
|
formatWebFetchHttpError: () => formatWebFetchHttpError,
|
|
344510
344513
|
clearWebFetchCache: () => clearWebFetchCache,
|
|
344514
|
+
classifyRecoverableWebFetchError: () => classifyRecoverableWebFetchError,
|
|
344511
344515
|
checkDomainBlocklist: () => checkDomainBlocklist,
|
|
344512
344516
|
applyPromptToMarkdown: () => applyPromptToMarkdown,
|
|
344517
|
+
WebFetchHttpError: () => WebFetchHttpError,
|
|
344513
344518
|
MAX_MARKDOWN_LENGTH: () => MAX_MARKDOWN_LENGTH
|
|
344514
344519
|
});
|
|
344515
344520
|
function clearWebFetchCache() {
|
|
@@ -344611,6 +344616,76 @@ function formatWebFetchHttpError(params) {
|
|
|
344611
344616
|
}
|
|
344612
344617
|
return message;
|
|
344613
344618
|
}
|
|
344619
|
+
function recoverableMessage(url3, reason) {
|
|
344620
|
+
return {
|
|
344621
|
+
result: `WebFetch could not retrieve ${url3}: ${reason}`,
|
|
344622
|
+
recoveryHint: "Use WebSearch to find a current accessible source, try the redirected/current URL, or skip this source and continue with other evidence."
|
|
344623
|
+
};
|
|
344624
|
+
}
|
|
344625
|
+
function classifyRecoverableWebFetchError(error41, url3) {
|
|
344626
|
+
if (error41 instanceof DomainBlockedError)
|
|
344627
|
+
return null;
|
|
344628
|
+
if (error41 instanceof DomainCheckFailedError)
|
|
344629
|
+
return null;
|
|
344630
|
+
const message = error41 instanceof Error ? error41.message : String(error41);
|
|
344631
|
+
const name = error41 instanceof Error ? error41.name : "";
|
|
344632
|
+
const codeValue = error41?.code;
|
|
344633
|
+
const code = typeof codeValue === "string" ? codeValue : "";
|
|
344634
|
+
if (name === "AbortError" || name === "CanceledError" || code === "ERR_CANCELED") {
|
|
344635
|
+
return null;
|
|
344636
|
+
}
|
|
344637
|
+
if (error41 instanceof WebFetchHttpError && [404, 410].includes(error41.status)) {
|
|
344638
|
+
const { result, recoveryHint } = recoverableMessage(url3, `HTTP ${error41.status} ${error41.statusText}`);
|
|
344639
|
+
return {
|
|
344640
|
+
errorKind: "not_found",
|
|
344641
|
+
code: error41.status,
|
|
344642
|
+
codeText: error41.statusText,
|
|
344643
|
+
result,
|
|
344644
|
+
recoveryHint
|
|
344645
|
+
};
|
|
344646
|
+
}
|
|
344647
|
+
if (/too many redirects/i.test(message)) {
|
|
344648
|
+
const { result, recoveryHint } = recoverableMessage(url3, "the page redirects too many times");
|
|
344649
|
+
return {
|
|
344650
|
+
errorKind: "redirect_loop",
|
|
344651
|
+
code: 0,
|
|
344652
|
+
codeText: "Too Many Redirects",
|
|
344653
|
+
result,
|
|
344654
|
+
recoveryHint
|
|
344655
|
+
};
|
|
344656
|
+
}
|
|
344657
|
+
if (code === "ERR_TLS_CERT_ALTNAME_INVALID" || /ERR_TLS_CERT_ALTNAME_INVALID|certificate|cert altname/i.test(message)) {
|
|
344658
|
+
const { result, recoveryHint } = recoverableMessage(url3, "the site TLS certificate does not match the requested host");
|
|
344659
|
+
return {
|
|
344660
|
+
errorKind: "tls_error",
|
|
344661
|
+
code: 0,
|
|
344662
|
+
codeText: "TLS Certificate Error",
|
|
344663
|
+
result,
|
|
344664
|
+
recoveryHint
|
|
344665
|
+
};
|
|
344666
|
+
}
|
|
344667
|
+
if (code === "ETIMEDOUT" || code === "ECONNABORTED" || /timeout of \d+ms exceeded|timed out|timeout/i.test(message)) {
|
|
344668
|
+
const { result, recoveryHint } = recoverableMessage(url3, "the request timed out");
|
|
344669
|
+
return {
|
|
344670
|
+
errorKind: "timeout",
|
|
344671
|
+
code: 0,
|
|
344672
|
+
codeText: "Timeout",
|
|
344673
|
+
result,
|
|
344674
|
+
recoveryHint
|
|
344675
|
+
};
|
|
344676
|
+
}
|
|
344677
|
+
if (error41 instanceof EgressBlockedError || ["ENOTFOUND", "EAI_AGAIN", "ECONNRESET", "ECONNREFUSED", "EPIPE"].includes(code) || /network|egress|unreachable|getaddrinfo|socket hang up/i.test(message)) {
|
|
344678
|
+
const { result, recoveryHint } = recoverableMessage(url3, "the host is blocked or unreachable from this network");
|
|
344679
|
+
return {
|
|
344680
|
+
errorKind: "network_error",
|
|
344681
|
+
code: 0,
|
|
344682
|
+
codeText: "Network Error",
|
|
344683
|
+
result,
|
|
344684
|
+
recoveryHint
|
|
344685
|
+
};
|
|
344686
|
+
}
|
|
344687
|
+
return null;
|
|
344688
|
+
}
|
|
344614
344689
|
async function getWithPermittedRedirects(url3, signal, redirectChecker, depth = 0) {
|
|
344615
344690
|
if (depth > MAX_REDIRECTS) {
|
|
344616
344691
|
throw new Error(`Too many redirects (exceeded ${MAX_REDIRECTS})`);
|
|
@@ -344650,12 +344725,12 @@ async function getWithPermittedRedirects(url3, signal, redirectChecker, depth =
|
|
|
344650
344725
|
throw new EgressBlockedError(hostname2);
|
|
344651
344726
|
}
|
|
344652
344727
|
if (axios_default.isAxiosError(error41) && error41.response) {
|
|
344653
|
-
throw new
|
|
344728
|
+
throw new WebFetchHttpError({
|
|
344654
344729
|
url: url3,
|
|
344655
344730
|
status: error41.response.status,
|
|
344656
344731
|
statusText: error41.response.statusText,
|
|
344657
344732
|
body: error41.response.data
|
|
344658
|
-
})
|
|
344733
|
+
});
|
|
344659
344734
|
}
|
|
344660
344735
|
throw error41;
|
|
344661
344736
|
}
|
|
@@ -344776,7 +344851,7 @@ async function applyPromptToMarkdown(prompt, markdownContent, signal, isNonInter
|
|
|
344776
344851
|
}
|
|
344777
344852
|
return "No response from model";
|
|
344778
344853
|
}
|
|
344779
|
-
var DomainBlockedError, DomainCheckFailedError, EgressBlockedError, CACHE_TTL_MS, MAX_CACHE_SIZE_BYTES, URL_CACHE, DOMAIN_CHECK_CACHE, turndownServicePromise, MAX_URL_LENGTH = 2000, MAX_HTTP_CONTENT_LENGTH = 10485760, FETCH_TIMEOUT_MS2 = 60000, DOMAIN_CHECK_TIMEOUT_MS = 1e4, MAX_REDIRECTS = 10, MAX_MARKDOWN_LENGTH = 1e5;
|
|
344854
|
+
var DomainBlockedError, DomainCheckFailedError, EgressBlockedError, WebFetchHttpError, CACHE_TTL_MS, MAX_CACHE_SIZE_BYTES, URL_CACHE, DOMAIN_CHECK_CACHE, turndownServicePromise, MAX_URL_LENGTH = 2000, MAX_HTTP_CONTENT_LENGTH = 10485760, FETCH_TIMEOUT_MS2 = 60000, DOMAIN_CHECK_TIMEOUT_MS = 1e4, MAX_REDIRECTS = 10, MAX_MARKDOWN_LENGTH = 1e5;
|
|
344780
344855
|
var init_utils9 = __esm(() => {
|
|
344781
344856
|
init_axios2();
|
|
344782
344857
|
init_index_min();
|
|
@@ -344812,6 +344887,18 @@ var init_utils9 = __esm(() => {
|
|
|
344812
344887
|
this.name = "EgressBlockedError";
|
|
344813
344888
|
}
|
|
344814
344889
|
};
|
|
344890
|
+
WebFetchHttpError = class WebFetchHttpError extends Error {
|
|
344891
|
+
url;
|
|
344892
|
+
status;
|
|
344893
|
+
statusText;
|
|
344894
|
+
constructor(params) {
|
|
344895
|
+
super(formatWebFetchHttpError(params));
|
|
344896
|
+
this.name = "WebFetchHttpError";
|
|
344897
|
+
this.url = params.url;
|
|
344898
|
+
this.status = params.status;
|
|
344899
|
+
this.statusText = params.statusText?.trim() || "HTTP Error";
|
|
344900
|
+
}
|
|
344901
|
+
};
|
|
344815
344902
|
CACHE_TTL_MS = 15 * 60 * 1000;
|
|
344816
344903
|
MAX_CACHE_SIZE_BYTES = 50 * 1024 * 1024;
|
|
344817
344904
|
URL_CACHE = new L({
|
|
@@ -344862,6 +344949,9 @@ var init_WebFetchTool = __esm(() => {
|
|
|
344862
344949
|
prompt: exports_external.string().describe("The prompt to run on the fetched content")
|
|
344863
344950
|
}));
|
|
344864
344951
|
outputSchema15 = lazySchema(() => exports_external.object({
|
|
344952
|
+
ok: exports_external.boolean().optional().describe("Whether the URL was fetched successfully"),
|
|
344953
|
+
errorKind: exports_external.enum(["not_found", "redirect_loop", "tls_error", "timeout", "network_error"]).optional().describe("Recoverable fetch failure category"),
|
|
344954
|
+
recoveryHint: exports_external.string().optional().describe("Suggested next step when ok is false"),
|
|
344865
344955
|
bytes: exports_external.number().describe("Size of the fetched content in bytes"),
|
|
344866
344956
|
code: exports_external.number().describe("HTTP response code"),
|
|
344867
344957
|
codeText: exports_external.string().describe("HTTP response code text"),
|
|
@@ -344984,7 +345074,30 @@ ${DESCRIPTION2}`;
|
|
|
344984
345074
|
renderToolResultMessage: renderToolResultMessage14,
|
|
344985
345075
|
async call({ url: url3, prompt }, { abortController, options: { isNonInteractiveSession } }) {
|
|
344986
345076
|
const start = Date.now();
|
|
344987
|
-
|
|
345077
|
+
let response;
|
|
345078
|
+
try {
|
|
345079
|
+
response = await getURLMarkdownContent(url3, abortController);
|
|
345080
|
+
} catch (error41) {
|
|
345081
|
+
const failure = classifyRecoverableWebFetchError(error41, url3);
|
|
345082
|
+
if (!failure) {
|
|
345083
|
+
throw error41;
|
|
345084
|
+
}
|
|
345085
|
+
return {
|
|
345086
|
+
data: {
|
|
345087
|
+
ok: false,
|
|
345088
|
+
bytes: 0,
|
|
345089
|
+
code: failure.code,
|
|
345090
|
+
codeText: failure.codeText,
|
|
345091
|
+
result: `${failure.result}
|
|
345092
|
+
|
|
345093
|
+
${failure.recoveryHint}`,
|
|
345094
|
+
durationMs: Date.now() - start,
|
|
345095
|
+
url: url3,
|
|
345096
|
+
errorKind: failure.errorKind,
|
|
345097
|
+
recoveryHint: failure.recoveryHint
|
|
345098
|
+
}
|
|
345099
|
+
};
|
|
345100
|
+
}
|
|
344988
345101
|
if ("type" in response && response.type === "redirect") {
|
|
344989
345102
|
const statusText = response.statusCode === 301 ? "Moved Permanently" : response.statusCode === 308 ? "Permanent Redirect" : response.statusCode === 307 ? "Temporary Redirect" : "Found";
|
|
344990
345103
|
const message = `REDIRECT DETECTED: The URL redirects to a different host.
|
|
@@ -344997,6 +345110,7 @@ To complete your request, I need to fetch content from the redirected URL. Pleas
|
|
|
344997
345110
|
- url: "${response.redirectUrl}"
|
|
344998
345111
|
- prompt: "${prompt}"`;
|
|
344999
345112
|
const output2 = {
|
|
345113
|
+
ok: true,
|
|
345000
345114
|
bytes: Buffer.byteLength(message),
|
|
345001
345115
|
code: response.statusCode,
|
|
345002
345116
|
codeText: statusText,
|
|
@@ -345030,6 +345144,7 @@ To complete your request, I need to fetch content from the redirected URL. Pleas
|
|
|
345030
345144
|
[Binary content (${contentType}, ${formatFileSize(persistedSize ?? bytes)}) also saved to ${persistedPath}]`;
|
|
345031
345145
|
}
|
|
345032
345146
|
const output = {
|
|
345147
|
+
ok: true,
|
|
345033
345148
|
bytes,
|
|
345034
345149
|
code,
|
|
345035
345150
|
codeText,
|
|
@@ -406253,11 +406368,29 @@ Skip using this tool when:
|
|
|
406253
406368
|
|
|
406254
406369
|
NOTE that you should not use this tool if there is only one trivial task to do. In this case you are better off just doing the task directly.
|
|
406255
406370
|
|
|
406371
|
+
## Accepted Input Shapes
|
|
406372
|
+
|
|
406373
|
+
Create one task:
|
|
406374
|
+
\`\`\`json
|
|
406375
|
+
{"subject": "Fix login redirect", "description": "Reproduce and patch the redirect loop after OAuth login"}
|
|
406376
|
+
\`\`\`
|
|
406377
|
+
|
|
406378
|
+
Create multiple tasks atomically:
|
|
406379
|
+
\`\`\`json
|
|
406380
|
+
{"tasks": [
|
|
406381
|
+
{"subject": "Collect market sources", "description": "Find current ecommerce market reports"},
|
|
406382
|
+
{"subject": "Draft HTML report", "description": "Compile the findings into a local HTML report"}
|
|
406383
|
+
]}
|
|
406384
|
+
\`\`\`
|
|
406385
|
+
|
|
406386
|
+
Do not pass a top-level \`tasks\` array unless you are creating multiple tasks. Completion notes belong in TaskUpdate \`metadata.completionNote\`, not in TaskCreate.
|
|
406387
|
+
|
|
406256
406388
|
## Task Fields
|
|
406257
406389
|
|
|
406258
406390
|
- **subject**: A brief, actionable title in imperative form (e.g., "Fix authentication bug in login flow")
|
|
406259
406391
|
- **description**: What needs to be done
|
|
406260
406392
|
- **activeForm** (optional): Present continuous form shown in the spinner when the task is in_progress (e.g., "Fixing authentication bug"). If omitted, the spinner shows the subject instead.
|
|
406393
|
+
- **metadata** (optional): Extra structured context that should stay attached to the task
|
|
406261
406394
|
|
|
406262
406395
|
All tasks are created with status \`pending\`.
|
|
406263
406396
|
|
|
@@ -406274,7 +406407,32 @@ var init_prompt23 = __esm(() => {
|
|
|
406274
406407
|
});
|
|
406275
406408
|
|
|
406276
406409
|
// src/tools/TaskCreateTool/TaskCreateTool.ts
|
|
406277
|
-
|
|
406410
|
+
async function createOneTask(taskListId, task, context) {
|
|
406411
|
+
const taskId = await createTask(taskListId, {
|
|
406412
|
+
subject: task.subject,
|
|
406413
|
+
description: task.description,
|
|
406414
|
+
activeForm: task.activeForm,
|
|
406415
|
+
status: "pending",
|
|
406416
|
+
owner: undefined,
|
|
406417
|
+
blocks: [],
|
|
406418
|
+
blockedBy: [],
|
|
406419
|
+
metadata: task.metadata
|
|
406420
|
+
});
|
|
406421
|
+
const blockingErrors = [];
|
|
406422
|
+
const generator = executeTaskCreatedHooks(taskId, task.subject, task.description, getAgentName(), getTeamName(), undefined, context?.abortController?.signal, undefined, context);
|
|
406423
|
+
for await (const result of generator) {
|
|
406424
|
+
if (result.blockingError) {
|
|
406425
|
+
blockingErrors.push(getTaskCreatedHookMessage(result.blockingError));
|
|
406426
|
+
}
|
|
406427
|
+
}
|
|
406428
|
+
if (blockingErrors.length > 0) {
|
|
406429
|
+
await deleteTask(taskListId, taskId);
|
|
406430
|
+
throw new Error(blockingErrors.join(`
|
|
406431
|
+
`));
|
|
406432
|
+
}
|
|
406433
|
+
return { id: taskId, subject: task.subject };
|
|
406434
|
+
}
|
|
406435
|
+
var taskInputSchema, inputSchema32, createdTaskSchema, outputSchema27, TaskCreateTool;
|
|
406278
406436
|
var init_TaskCreateTool = __esm(() => {
|
|
406279
406437
|
init_v4();
|
|
406280
406438
|
init_Tool();
|
|
@@ -406282,17 +406440,43 @@ var init_TaskCreateTool = __esm(() => {
|
|
|
406282
406440
|
init_tasks();
|
|
406283
406441
|
init_teammate();
|
|
406284
406442
|
init_prompt23();
|
|
406285
|
-
|
|
406443
|
+
taskInputSchema = exports_external.strictObject({
|
|
406286
406444
|
subject: exports_external.string().describe("A brief title for the task"),
|
|
406287
406445
|
description: exports_external.string().describe("What needs to be done"),
|
|
406288
406446
|
activeForm: exports_external.string().optional().describe('Present continuous form shown in spinner when in_progress (e.g., "Running tests")'),
|
|
406289
406447
|
metadata: exports_external.record(exports_external.string(), exports_external.unknown()).optional().describe("Arbitrary metadata to attach to the task")
|
|
406448
|
+
});
|
|
406449
|
+
inputSchema32 = lazySchema(() => exports_external.strictObject({
|
|
406450
|
+
subject: exports_external.string().optional().describe("A brief title for the task"),
|
|
406451
|
+
description: exports_external.string().optional().describe("What needs to be done"),
|
|
406452
|
+
activeForm: exports_external.string().optional().describe('Present continuous form shown in spinner when in_progress (e.g., "Running tests")'),
|
|
406453
|
+
metadata: exports_external.record(exports_external.string(), exports_external.unknown()).optional().describe("Arbitrary metadata to attach to the task"),
|
|
406454
|
+
tasks: exports_external.array(taskInputSchema).min(1).optional().describe("Optional batch of tasks to create atomically")
|
|
406455
|
+
}).superRefine((input2, ctx) => {
|
|
406456
|
+
if (input2.tasks && input2.tasks.length > 0)
|
|
406457
|
+
return;
|
|
406458
|
+
if (!input2.subject) {
|
|
406459
|
+
ctx.addIssue({
|
|
406460
|
+
code: "custom",
|
|
406461
|
+
path: ["subject"],
|
|
406462
|
+
message: "TaskCreate requires subject when tasks is not provided"
|
|
406463
|
+
});
|
|
406464
|
+
}
|
|
406465
|
+
if (!input2.description) {
|
|
406466
|
+
ctx.addIssue({
|
|
406467
|
+
code: "custom",
|
|
406468
|
+
path: ["description"],
|
|
406469
|
+
message: "TaskCreate requires description when tasks is not provided"
|
|
406470
|
+
});
|
|
406471
|
+
}
|
|
406290
406472
|
}));
|
|
406473
|
+
createdTaskSchema = exports_external.object({
|
|
406474
|
+
id: exports_external.string(),
|
|
406475
|
+
subject: exports_external.string()
|
|
406476
|
+
});
|
|
406291
406477
|
outputSchema27 = lazySchema(() => exports_external.object({
|
|
406292
|
-
task:
|
|
406293
|
-
|
|
406294
|
-
subject: exports_external.string()
|
|
406295
|
-
})
|
|
406478
|
+
task: createdTaskSchema,
|
|
406479
|
+
tasks: exports_external.array(createdTaskSchema).optional()
|
|
406296
406480
|
}));
|
|
406297
406481
|
TaskCreateTool = buildTool({
|
|
406298
406482
|
name: TASK_CREATE_TOOL_NAME,
|
|
@@ -406321,33 +406505,34 @@ var init_TaskCreateTool = __esm(() => {
|
|
|
406321
406505
|
return true;
|
|
406322
406506
|
},
|
|
406323
406507
|
toAutoClassifierInput(input2) {
|
|
406324
|
-
|
|
406508
|
+
if (Array.isArray(input2.tasks)) {
|
|
406509
|
+
return input2.tasks.map((task) => task.subject).join(" ");
|
|
406510
|
+
}
|
|
406511
|
+
return input2.subject ?? "";
|
|
406325
406512
|
},
|
|
406326
406513
|
renderToolUseMessage() {
|
|
406327
406514
|
return null;
|
|
406328
406515
|
},
|
|
406329
|
-
async call(
|
|
406330
|
-
const
|
|
406331
|
-
|
|
406332
|
-
|
|
406333
|
-
|
|
406334
|
-
|
|
406335
|
-
|
|
406336
|
-
|
|
406337
|
-
blockedBy: [],
|
|
406338
|
-
metadata
|
|
406339
|
-
});
|
|
406340
|
-
const blockingErrors = [];
|
|
406341
|
-
const generator = executeTaskCreatedHooks(taskId, subject, description, getAgentName(), getTeamName(), undefined, context?.abortController?.signal, undefined, context);
|
|
406342
|
-
for await (const result of generator) {
|
|
406343
|
-
if (result.blockingError) {
|
|
406344
|
-
blockingErrors.push(getTaskCreatedHookMessage(result.blockingError));
|
|
406516
|
+
async call(input2, context) {
|
|
406517
|
+
const taskListId = getTaskListId();
|
|
406518
|
+
const tasks = input2.tasks?.length ? input2.tasks : [
|
|
406519
|
+
{
|
|
406520
|
+
subject: input2.subject,
|
|
406521
|
+
description: input2.description,
|
|
406522
|
+
activeForm: input2.activeForm,
|
|
406523
|
+
metadata: input2.metadata
|
|
406345
406524
|
}
|
|
406346
|
-
|
|
406347
|
-
|
|
406348
|
-
|
|
406349
|
-
|
|
406350
|
-
|
|
406525
|
+
];
|
|
406526
|
+
const createdTasks = [];
|
|
406527
|
+
try {
|
|
406528
|
+
for (const task of tasks) {
|
|
406529
|
+
createdTasks.push(await createOneTask(taskListId, task, context));
|
|
406530
|
+
}
|
|
406531
|
+
} catch (error41) {
|
|
406532
|
+
for (const task of createdTasks) {
|
|
406533
|
+
await deleteTask(taskListId, task.id);
|
|
406534
|
+
}
|
|
406535
|
+
throw error41;
|
|
406351
406536
|
}
|
|
406352
406537
|
context.setAppState((prev) => {
|
|
406353
406538
|
if (prev.expandedView === "tasks")
|
|
@@ -406356,19 +406541,18 @@ var init_TaskCreateTool = __esm(() => {
|
|
|
406356
406541
|
});
|
|
406357
406542
|
return {
|
|
406358
406543
|
data: {
|
|
406359
|
-
task:
|
|
406360
|
-
|
|
406361
|
-
subject
|
|
406362
|
-
}
|
|
406544
|
+
task: createdTasks[0],
|
|
406545
|
+
tasks: createdTasks
|
|
406363
406546
|
}
|
|
406364
406547
|
};
|
|
406365
406548
|
},
|
|
406366
406549
|
mapToolResultToToolResultBlockParam(content, toolUseID) {
|
|
406367
|
-
const { task } = content;
|
|
406550
|
+
const { task, tasks } = content;
|
|
406551
|
+
const createdTasks = tasks?.length ? tasks : [task];
|
|
406368
406552
|
return {
|
|
406369
406553
|
tool_use_id: toolUseID,
|
|
406370
406554
|
type: "tool_result",
|
|
406371
|
-
content: `Task #${task.id} created successfully: ${task.subject}`
|
|
406555
|
+
content: createdTasks.length === 1 ? `Task #${task.id} created successfully: ${task.subject}` : `Created ${createdTasks.length} tasks successfully: ${createdTasks.map((item) => `#${item.id} ${item.subject}`).join(", ")}`
|
|
406372
406556
|
};
|
|
406373
406557
|
}
|
|
406374
406558
|
});
|
|
@@ -406544,6 +406728,13 @@ var DESCRIPTION17 = "Update a task in the task list", PROMPT7 = `Use this tool t
|
|
|
406544
406728
|
- **addBlocks**: Mark tasks that cannot start until this one completes
|
|
406545
406729
|
- **addBlockedBy**: Mark tasks that must complete before this one can start
|
|
406546
406730
|
|
|
406731
|
+
Completion notes must be stored as metadata:
|
|
406732
|
+
\`\`\`json
|
|
406733
|
+
{"taskId": "1", "status": "completed", "metadata": {"completionNote": "Verified with bun test"}}
|
|
406734
|
+
\`\`\`
|
|
406735
|
+
|
|
406736
|
+
If a provider emits \`completionNote\`, \`note\`, \`result\`, or \`summary\`, Agent-OS will normalize it into \`metadata.completionNote\`.
|
|
406737
|
+
|
|
406547
406738
|
## Status Workflow
|
|
406548
406739
|
|
|
406549
406740
|
Status progresses: \`pending\` \u2192 \`in_progress\` \u2192 \`completed\`
|
|
@@ -406566,6 +406757,11 @@ Mark task as completed after finishing work:
|
|
|
406566
406757
|
{"taskId": "1", "status": "completed"}
|
|
406567
406758
|
\`\`\`
|
|
406568
406759
|
|
|
406760
|
+
Mark task as completed with a note:
|
|
406761
|
+
\`\`\`json
|
|
406762
|
+
{"taskId": "1", "status": "completed", "metadata": {"completionNote": "Generated the final report and checked the output file"}}
|
|
406763
|
+
\`\`\`
|
|
406764
|
+
|
|
406569
406765
|
Delete a task:
|
|
406570
406766
|
\`\`\`json
|
|
406571
406767
|
{"taskId": "1", "status": "deleted"}
|
|
@@ -416343,7 +416539,7 @@ function getInvokedBinary() {
|
|
|
416343
416539
|
async function getDoctorDiagnostic() {
|
|
416344
416540
|
return {
|
|
416345
416541
|
installationType: "package-manager",
|
|
416346
|
-
version: "1.0.0-alpha.
|
|
416542
|
+
version: "1.0.0-alpha.25",
|
|
416347
416543
|
installationPath: process.argv[1] ?? "",
|
|
416348
416544
|
invokedBinary: getInvokedBinary(),
|
|
416349
416545
|
configInstallMethod: "not set",
|
|
@@ -416748,7 +416944,7 @@ function buildPrimarySection() {
|
|
|
416748
416944
|
});
|
|
416749
416945
|
return [{
|
|
416750
416946
|
label: "Version",
|
|
416751
|
-
value: "1.0.0-alpha.
|
|
416947
|
+
value: "1.0.0-alpha.25"
|
|
416752
416948
|
}, {
|
|
416753
416949
|
label: "Session name",
|
|
416754
416950
|
value: nameValue
|
|
@@ -420391,7 +420587,7 @@ function Config({
|
|
|
420391
420587
|
}
|
|
420392
420588
|
})
|
|
420393
420589
|
}) : showSubmenu === "ChannelDowngrade" ? /* @__PURE__ */ jsx_runtime169.jsx(ChannelDowngradeDialog, {
|
|
420394
|
-
currentVersion: "1.0.0-alpha.
|
|
420590
|
+
currentVersion: "1.0.0-alpha.25",
|
|
420395
420591
|
onChoice: (choice) => {
|
|
420396
420592
|
setShowSubmenu(null);
|
|
420397
420593
|
setTabsHidden(false);
|
|
@@ -420403,7 +420599,7 @@ function Config({
|
|
|
420403
420599
|
autoUpdatesChannel: "stable"
|
|
420404
420600
|
};
|
|
420405
420601
|
if (choice === "stay") {
|
|
420406
|
-
newSettings.minimumVersion = "1.0.0-alpha.
|
|
420602
|
+
newSettings.minimumVersion = "1.0.0-alpha.25";
|
|
420407
420603
|
}
|
|
420408
420604
|
updateSettingsForSource("userSettings", newSettings);
|
|
420409
420605
|
setSettingsData((prev_27) => ({
|
|
@@ -428394,7 +428590,7 @@ function HelpV2(t0) {
|
|
|
428394
428590
|
let t6;
|
|
428395
428591
|
if ($3[31] !== tabs) {
|
|
428396
428592
|
t6 = /* @__PURE__ */ jsx_runtime195.jsx(Tabs, {
|
|
428397
|
-
title: `Agent-OS v${"1.0.0-alpha.
|
|
428593
|
+
title: `Agent-OS v${"1.0.0-alpha.25"}`,
|
|
428398
428594
|
color: "professionalBlue",
|
|
428399
428595
|
defaultTab: "general",
|
|
428400
428596
|
children: tabs
|
|
@@ -431522,7 +431718,7 @@ var init_user = __esm(() => {
|
|
|
431522
431718
|
deviceId,
|
|
431523
431719
|
sessionId: getSessionId(),
|
|
431524
431720
|
email: getEmail(),
|
|
431525
|
-
appVersion: "1.0.0-alpha.
|
|
431721
|
+
appVersion: "1.0.0-alpha.25",
|
|
431526
431722
|
platform: getHostPlatformForAnalytics(),
|
|
431527
431723
|
organizationUuid,
|
|
431528
431724
|
accountUuid,
|
|
@@ -451773,7 +451969,7 @@ function getAllReleaseNotes(changelogContent = getStoredChangelogFromMemory()) {
|
|
|
451773
451969
|
return [];
|
|
451774
451970
|
}
|
|
451775
451971
|
}
|
|
451776
|
-
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.0.0-alpha.
|
|
451972
|
+
async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.0.0-alpha.25") {
|
|
451777
451973
|
if (process.env.USER_TYPE === "ant") {
|
|
451778
451974
|
const changelog = "";
|
|
451779
451975
|
if (changelog) {
|
|
@@ -451800,7 +451996,7 @@ async function checkForReleaseNotes(lastSeenVersion, currentVersion = "1.0.0-alp
|
|
|
451800
451996
|
releaseNotes
|
|
451801
451997
|
};
|
|
451802
451998
|
}
|
|
451803
|
-
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.0.0-alpha.
|
|
451999
|
+
function checkForReleaseNotesSync(lastSeenVersion, currentVersion = "1.0.0-alpha.25") {
|
|
451804
452000
|
if (process.env.USER_TYPE === "ant") {
|
|
451805
452001
|
const changelog = "";
|
|
451806
452002
|
if (changelog) {
|
|
@@ -452927,7 +453123,7 @@ function getRecentActivitySync() {
|
|
|
452927
453123
|
return cachedActivity;
|
|
452928
453124
|
}
|
|
452929
453125
|
function getLogoDisplayData() {
|
|
452930
|
-
const version2 = process.env.DEMO_VERSION ?? "1.0.0-alpha.
|
|
453126
|
+
const version2 = process.env.DEMO_VERSION ?? "1.0.0-alpha.25";
|
|
452931
453127
|
const serverUrl = getDirectConnectServerUrl();
|
|
452932
453128
|
const displayPath = process.env.DEMO_VERSION ? "/code/claude" : getDisplayPath(getCwd());
|
|
452933
453129
|
const cwd2 = serverUrl ? `${displayPath} in ${serverUrl.replace(/^https?:\/\//, "")}` : displayPath;
|
|
@@ -454142,7 +454338,7 @@ function LogoV2() {
|
|
|
454142
454338
|
if ($3[2] === Symbol.for("react.memo_cache_sentinel")) {
|
|
454143
454339
|
t2 = () => {
|
|
454144
454340
|
const currentConfig = getGlobalConfig();
|
|
454145
|
-
if (currentConfig.lastReleaseNotesSeen === "1.0.0-alpha.
|
|
454341
|
+
if (currentConfig.lastReleaseNotesSeen === "1.0.0-alpha.25") {
|
|
454146
454342
|
return;
|
|
454147
454343
|
}
|
|
454148
454344
|
saveGlobalConfig(_temp328);
|
|
@@ -454808,12 +455004,12 @@ function AgentOsPoster() {
|
|
|
454808
455004
|
});
|
|
454809
455005
|
}
|
|
454810
455006
|
function _temp328(current) {
|
|
454811
|
-
if (current.lastReleaseNotesSeen === "1.0.0-alpha.
|
|
455007
|
+
if (current.lastReleaseNotesSeen === "1.0.0-alpha.25") {
|
|
454812
455008
|
return current;
|
|
454813
455009
|
}
|
|
454814
455010
|
return {
|
|
454815
455011
|
...current,
|
|
454816
|
-
lastReleaseNotesSeen: "1.0.0-alpha.
|
|
455012
|
+
lastReleaseNotesSeen: "1.0.0-alpha.25"
|
|
454817
455013
|
};
|
|
454818
455014
|
}
|
|
454819
455015
|
function _temp245(s_0) {
|
|
@@ -481390,7 +481586,7 @@ async function captureMemoryDiagnostics(trigger, dumpNumber = 0) {
|
|
|
481390
481586
|
smapsRollup,
|
|
481391
481587
|
platform: process.platform,
|
|
481392
481588
|
nodeVersion: process.version,
|
|
481393
|
-
ccVersion: "1.0.0-alpha.
|
|
481589
|
+
ccVersion: "1.0.0-alpha.25"
|
|
481394
481590
|
};
|
|
481395
481591
|
}
|
|
481396
481592
|
async function performHeapDump(trigger = "manual", dumpNumber = 0) {
|
|
@@ -481963,7 +482159,7 @@ var init_bridge_kick = __esm(() => {
|
|
|
481963
482159
|
var call58 = async () => {
|
|
481964
482160
|
return {
|
|
481965
482161
|
type: "text",
|
|
481966
|
-
value: `${"1.0.0-alpha.
|
|
482162
|
+
value: `${"1.0.0-alpha.25"} (built ${"2026-05-21T15:45:55Z"})`
|
|
481967
482163
|
};
|
|
481968
482164
|
}, version2, version_default;
|
|
481969
482165
|
var init_version = __esm(() => {
|
|
@@ -491455,7 +491651,7 @@ function generateHtmlReport(data, insights) {
|
|
|
491455
491651
|
</html>`;
|
|
491456
491652
|
}
|
|
491457
491653
|
function buildExportData(data, insights, facets, remoteStats) {
|
|
491458
|
-
const version3 = typeof MACRO !== "undefined" ? "1.0.0-alpha.
|
|
491654
|
+
const version3 = typeof MACRO !== "undefined" ? "1.0.0-alpha.25" : "unknown";
|
|
491459
491655
|
const remote_hosts_collected = remoteStats?.hosts.filter((h3) => h3.sessionCount > 0).map((h3) => h3.name);
|
|
491460
491656
|
const facets_summary = {
|
|
491461
491657
|
total: facets.size,
|
|
@@ -495320,9 +495516,81 @@ function moveToMetadata(input2, keys2) {
|
|
|
495320
495516
|
input2.metadata = metadata;
|
|
495321
495517
|
}
|
|
495322
495518
|
}
|
|
495519
|
+
function moveFirstValueToMetadataKey(input2, keys2, metadataKey) {
|
|
495520
|
+
const metadata = isRecord4(input2.metadata) ? { ...input2.metadata } : {};
|
|
495521
|
+
let moved = false;
|
|
495522
|
+
for (const key2 of keys2) {
|
|
495523
|
+
const value = input2[key2];
|
|
495524
|
+
if (value !== undefined) {
|
|
495525
|
+
if (!moved) {
|
|
495526
|
+
metadata[metadataKey] = value;
|
|
495527
|
+
moved = true;
|
|
495528
|
+
}
|
|
495529
|
+
delete input2[key2];
|
|
495530
|
+
}
|
|
495531
|
+
}
|
|
495532
|
+
if (moved) {
|
|
495533
|
+
input2.metadata = metadata;
|
|
495534
|
+
}
|
|
495535
|
+
}
|
|
495323
495536
|
function firstMeaningfulLine(value) {
|
|
495324
495537
|
return value.split(/\r?\n/).map((line) => line.trim()).find(Boolean) ?? value.trim();
|
|
495325
495538
|
}
|
|
495539
|
+
function normalizeTaskStatus2(value) {
|
|
495540
|
+
if (typeof value !== "string")
|
|
495541
|
+
return value;
|
|
495542
|
+
const normalized = value.trim().toLowerCase();
|
|
495543
|
+
if (["done", "resolved", "complete", "completed"].includes(normalized)) {
|
|
495544
|
+
return "completed";
|
|
495545
|
+
}
|
|
495546
|
+
if (["doing", "running", "started", "active", "in-progress"].includes(normalized)) {
|
|
495547
|
+
return "in_progress";
|
|
495548
|
+
}
|
|
495549
|
+
if (["todo", "open", "new"].includes(normalized)) {
|
|
495550
|
+
return "pending";
|
|
495551
|
+
}
|
|
495552
|
+
return value;
|
|
495553
|
+
}
|
|
495554
|
+
function normalizeTaskCreateEntry(entry, commonMetadata) {
|
|
495555
|
+
const normalized = typeof entry === "string" ? { subject: firstMeaningfulLine(entry).slice(0, 120), description: entry } : isRecord4(entry) ? { ...entry } : entry;
|
|
495556
|
+
if (!isRecord4(normalized))
|
|
495557
|
+
return normalized;
|
|
495558
|
+
normalized.subject ??= takeString(normalized, ["title", "task", "name"]);
|
|
495559
|
+
normalized.description ??= takeString(normalized, [
|
|
495560
|
+
"description",
|
|
495561
|
+
"details",
|
|
495562
|
+
"content",
|
|
495563
|
+
"prompt"
|
|
495564
|
+
]);
|
|
495565
|
+
if (!normalized.subject && typeof normalized.description === "string") {
|
|
495566
|
+
normalized.subject = firstMeaningfulLine(normalized.description).slice(0, 120);
|
|
495567
|
+
}
|
|
495568
|
+
if (!normalized.description && typeof normalized.subject === "string") {
|
|
495569
|
+
normalized.description = normalized.subject;
|
|
495570
|
+
}
|
|
495571
|
+
if (commonMetadata && Object.keys(commonMetadata).length > 0) {
|
|
495572
|
+
normalized.metadata = {
|
|
495573
|
+
...commonMetadata,
|
|
495574
|
+
...isRecord4(normalized.metadata) ? normalized.metadata : {}
|
|
495575
|
+
};
|
|
495576
|
+
}
|
|
495577
|
+
moveToMetadata(normalized, [
|
|
495578
|
+
"parentTaskId",
|
|
495579
|
+
"state",
|
|
495580
|
+
"status",
|
|
495581
|
+
"subagent_type",
|
|
495582
|
+
"subtasks"
|
|
495583
|
+
]);
|
|
495584
|
+
removeKeys(normalized, [
|
|
495585
|
+
"title",
|
|
495586
|
+
"task",
|
|
495587
|
+
"name",
|
|
495588
|
+
"details",
|
|
495589
|
+
"content",
|
|
495590
|
+
"prompt"
|
|
495591
|
+
]);
|
|
495592
|
+
return normalized;
|
|
495593
|
+
}
|
|
495326
495594
|
function normalizeProviderToolInput(toolName, input2) {
|
|
495327
495595
|
if (!isRecord4(input2))
|
|
495328
495596
|
return input2;
|
|
@@ -495417,40 +495685,51 @@ function normalizeProviderToolInput(toolName, input2) {
|
|
|
495417
495685
|
}
|
|
495418
495686
|
removeKeys(normalized, ["toolName", "tool", "name", "raw"]);
|
|
495419
495687
|
} else if (toolName === TASK_CREATE_TOOL_NAME) {
|
|
495420
|
-
|
|
495421
|
-
normalized.description ??= takeString(normalized, [
|
|
495422
|
-
"description",
|
|
495423
|
-
"details",
|
|
495424
|
-
"content",
|
|
495425
|
-
"prompt"
|
|
495426
|
-
]);
|
|
495427
|
-
if (!normalized.subject && typeof normalized.description === "string") {
|
|
495428
|
-
normalized.subject = firstMeaningfulLine(normalized.description).slice(0, 120);
|
|
495429
|
-
}
|
|
495430
|
-
if (!normalized.description && typeof normalized.subject === "string") {
|
|
495431
|
-
normalized.description = normalized.subject;
|
|
495432
|
-
}
|
|
495433
|
-
moveToMetadata(normalized, [
|
|
495688
|
+
const taskContextKeys = [
|
|
495434
495689
|
"parentTaskId",
|
|
495435
495690
|
"state",
|
|
495436
495691
|
"status",
|
|
495437
495692
|
"subagent_type",
|
|
495438
495693
|
"subtasks"
|
|
495439
|
-
]
|
|
495440
|
-
|
|
495441
|
-
|
|
495442
|
-
|
|
495443
|
-
|
|
495444
|
-
|
|
495445
|
-
|
|
495446
|
-
|
|
495447
|
-
|
|
495694
|
+
];
|
|
495695
|
+
if (Array.isArray(normalized.tasks)) {
|
|
495696
|
+
const commonMetadata = {};
|
|
495697
|
+
for (const key2 of taskContextKeys) {
|
|
495698
|
+
if (normalized[key2] !== undefined) {
|
|
495699
|
+
commonMetadata[key2] = normalized[key2];
|
|
495700
|
+
}
|
|
495701
|
+
}
|
|
495702
|
+
normalized.tasks = normalized.tasks.map((task) => normalizeTaskCreateEntry(task, commonMetadata));
|
|
495703
|
+
removeKeys(normalized, [
|
|
495704
|
+
"subject",
|
|
495705
|
+
"description",
|
|
495706
|
+
"activeForm",
|
|
495707
|
+
"metadata",
|
|
495708
|
+
"title",
|
|
495709
|
+
"task",
|
|
495710
|
+
"name",
|
|
495711
|
+
"details",
|
|
495712
|
+
"content",
|
|
495713
|
+
"prompt",
|
|
495714
|
+
...taskContextKeys
|
|
495715
|
+
]);
|
|
495716
|
+
} else {
|
|
495717
|
+
const singleTask = normalizeTaskCreateEntry(normalized);
|
|
495718
|
+
if (isRecord4(singleTask)) {
|
|
495719
|
+
for (const key2 of Object.keys(normalized)) {
|
|
495720
|
+
delete normalized[key2];
|
|
495721
|
+
}
|
|
495722
|
+
Object.assign(normalized, singleTask);
|
|
495723
|
+
}
|
|
495724
|
+
}
|
|
495448
495725
|
} else if (toolName === TASK_UPDATE_TOOL_NAME) {
|
|
495449
495726
|
normalized.taskId ??= takeString(normalized, ["id", "task_id", "task"]);
|
|
495450
495727
|
normalized.status ??= takeString(normalized, ["state"]);
|
|
495728
|
+
normalized.status = normalizeTaskStatus2(normalized.status);
|
|
495451
495729
|
normalized.subject ??= takeString(normalized, ["title"]);
|
|
495452
495730
|
normalized.description ??= takeString(normalized, ["details", "content"]);
|
|
495453
495731
|
moveToMetadata(normalized, ["parentTaskId"]);
|
|
495732
|
+
moveFirstValueToMetadataKey(normalized, ["completionNote", "note", "result", "summary"], "completionNote");
|
|
495454
495733
|
removeKeys(normalized, [
|
|
495455
495734
|
"id",
|
|
495456
495735
|
"task_id",
|
|
@@ -495458,7 +495737,11 @@ function normalizeProviderToolInput(toolName, input2) {
|
|
|
495458
495737
|
"state",
|
|
495459
495738
|
"title",
|
|
495460
495739
|
"details",
|
|
495461
|
-
"content"
|
|
495740
|
+
"content",
|
|
495741
|
+
"completionNote",
|
|
495742
|
+
"note",
|
|
495743
|
+
"result",
|
|
495744
|
+
"summary"
|
|
495462
495745
|
]);
|
|
495463
495746
|
} else if (toolName === WEB_FETCH_TOOL_NAME) {
|
|
495464
495747
|
normalized.url ??= takeString(normalized, ["href", "link", "website"]);
|
|
@@ -505265,6 +505548,7 @@ function getSimplePrompt() {
|
|
|
505265
505548
|
`Read files: Use ${FILE_READ_TOOL_NAME} (NOT cat/head/tail)`,
|
|
505266
505549
|
`Edit files: Use ${FILE_EDIT_TOOL_NAME} (NOT sed/awk)`,
|
|
505267
505550
|
`Write files: Use ${FILE_WRITE_TOOL_NAME} (NOT echo >/cat <<EOF)`,
|
|
505551
|
+
`Create reports/HTML/JSON/Markdown files: Use ${FILE_WRITE_TOOL_NAME} for the full content (NOT eval, node -e, python -c, echo, or printf with large inline strings)`,
|
|
505268
505552
|
"Communication: Output text directly (NOT echo/printf)"
|
|
505269
505553
|
];
|
|
505270
505554
|
const avoidCommands = embedded ? "`cat`, `head`, `tail`, `sed`, `awk`, or `echo`" : "`find`, `grep`, `cat`, `head`, `tail`, `sed`, `awk`, or `echo`";
|
|
@@ -505297,6 +505581,7 @@ function getSimplePrompt() {
|
|
|
505297
505581
|
"Try to maintain your current working directory throughout the session by using absolute paths and avoiding usage of `cd`. You may use `cd` if the User explicitly requests it.",
|
|
505298
505582
|
`You may specify an optional timeout in milliseconds (up to ${getMaxTimeoutMs2()}ms / ${getMaxTimeoutMs2() / 60000} minutes). By default, your command will timeout after ${getDefaultTimeoutMs2()}ms (${getDefaultTimeoutMs2() / 60000} minutes).`,
|
|
505299
505583
|
...backgroundNote !== null ? [backgroundNote] : [],
|
|
505584
|
+
"Do not compose large HTML, Markdown, or JSON artifacts through shell inline strings. If the content spans multiple lines or contains document markup like <!DOCTYPE html>, use the Write tool to create the file, then use Bash only to inspect or validate it.",
|
|
505300
505585
|
"When issuing multiple commands:",
|
|
505301
505586
|
multipleCommandsSubitems,
|
|
505302
505587
|
"For git commands:",
|
|
@@ -505456,6 +505741,18 @@ function isSilentBashCommand(command8) {
|
|
|
505456
505741
|
}
|
|
505457
505742
|
return hasNonFallbackCommand;
|
|
505458
505743
|
}
|
|
505744
|
+
function getInlineArtifactCommandBlockReason(command8) {
|
|
505745
|
+
const lower = command8.toLowerCase();
|
|
505746
|
+
const usesInlineExecution = /\beval\b/.test(lower) || /\b(?:node|bun|python3?|perl|ruby)\s+(?:-[a-z]*e|--eval|--print)\b/.test(lower) || /^\s*(?:echo|printf)\b/.test(lower);
|
|
505747
|
+
if (!usesInlineExecution)
|
|
505748
|
+
return null;
|
|
505749
|
+
const hasArtifactMarker = /<!doctype\s+html|<html[\s>]|<\/html>|<body[\s>]|<script[\s>]|<style[\s>]|```/i.test(command8);
|
|
505750
|
+
const quoteCount = (command8.match(/["']/g) ?? []).length;
|
|
505751
|
+
const looksLikeLargeInlineArtifact = command8.length > 1200 && quoteCount > 20;
|
|
505752
|
+
if (!hasArtifactMarker && !looksLikeLargeInlineArtifact)
|
|
505753
|
+
return null;
|
|
505754
|
+
return `Blocked: large HTML, Markdown, or JSON artifacts should be written with ${FILE_WRITE_TOOL_NAME}, not composed through Bash/eval/inline code. Use ${FILE_WRITE_TOOL_NAME} for the file content, then use Bash only for validation commands.`;
|
|
505755
|
+
}
|
|
505459
505756
|
function isAutobackgroundingAllowed2(command8) {
|
|
505460
505757
|
const parts = splitCommand_DEPRECATED(command8);
|
|
505461
505758
|
if (parts.length === 0)
|
|
@@ -505758,6 +506055,7 @@ var init_BashTool = __esm(() => {
|
|
|
505758
506055
|
init_readOnlyValidation2();
|
|
505759
506056
|
init_sedEditParser();
|
|
505760
506057
|
init_shouldUseSandbox();
|
|
506058
|
+
init_prompt4();
|
|
505761
506059
|
init_UI3();
|
|
505762
506060
|
init_utils5();
|
|
505763
506061
|
jsx_runtime336 = __toESM(require_jsx_runtime(), 1);
|
|
@@ -505929,6 +506227,14 @@ For commands that are harder to parse at a glance (piped commands, obscure flags
|
|
|
505929
506227
|
return `Running ${desc}`;
|
|
505930
506228
|
},
|
|
505931
506229
|
async validateInput(input2) {
|
|
506230
|
+
const inlineArtifactBlockReason = getInlineArtifactCommandBlockReason(input2.command);
|
|
506231
|
+
if (inlineArtifactBlockReason !== null) {
|
|
506232
|
+
return {
|
|
506233
|
+
result: false,
|
|
506234
|
+
message: inlineArtifactBlockReason,
|
|
506235
|
+
errorCode: 12
|
|
506236
|
+
};
|
|
506237
|
+
}
|
|
505932
506238
|
if (false) {}
|
|
505933
506239
|
return {
|
|
505934
506240
|
result: true
|
|
@@ -515677,7 +515983,7 @@ var init_filesystem = __esm(() => {
|
|
|
515677
515983
|
});
|
|
515678
515984
|
getBundledSkillsRoot = memoize_default(function getBundledSkillsRoot2() {
|
|
515679
515985
|
const nonce = randomBytes18(16).toString("hex");
|
|
515680
|
-
return join146(getClaudeTempDir(), "bundled-skills", "1.0.0-alpha.
|
|
515986
|
+
return join146(getClaudeTempDir(), "bundled-skills", "1.0.0-alpha.25", nonce);
|
|
515681
515987
|
});
|
|
515682
515988
|
getResolvedWorkingDirPaths = memoize_default(getPathsForPermissionCheck);
|
|
515683
515989
|
});
|
|
@@ -521607,7 +521913,7 @@ function computeFingerprintFromMessages(messages) {
|
|
|
521607
521913
|
}
|
|
521608
521914
|
var AGENT_OS_VERSION5, FINGERPRINT_SALT = "59cf53e54c78";
|
|
521609
521915
|
var init_fingerprint = __esm(() => {
|
|
521610
|
-
AGENT_OS_VERSION5 = typeof MACRO !== "undefined" ? "1.0.0-alpha.
|
|
521916
|
+
AGENT_OS_VERSION5 = typeof MACRO !== "undefined" ? "1.0.0-alpha.25" : "dev";
|
|
521611
521917
|
});
|
|
521612
521918
|
|
|
521613
521919
|
// src/services/compact/apiMicrocompact.ts
|
|
@@ -523361,7 +523667,7 @@ async function sideQuery(opts) {
|
|
|
523361
523667
|
betas.push(STRUCTURED_OUTPUTS_BETA_HEADER);
|
|
523362
523668
|
}
|
|
523363
523669
|
const messageText = extractFirstUserMessageText(messages);
|
|
523364
|
-
const fingerprint = computeFingerprint(messageText, "1.0.0-alpha.
|
|
523670
|
+
const fingerprint = computeFingerprint(messageText, "1.0.0-alpha.25");
|
|
523365
523671
|
const attributionHeader = getAttributionHeader(fingerprint);
|
|
523366
523672
|
const systemBlocks = [
|
|
523367
523673
|
attributionHeader ? { type: "text", text: attributionHeader } : null,
|
|
@@ -525280,7 +525586,7 @@ function appendToLog(path24, message) {
|
|
|
525280
525586
|
cwd: getFsImplementation().cwd(),
|
|
525281
525587
|
userType: process.env.USER_TYPE,
|
|
525282
525588
|
sessionId: getSessionId(),
|
|
525283
|
-
version: "1.0.0-alpha.
|
|
525589
|
+
version: "1.0.0-alpha.25"
|
|
525284
525590
|
};
|
|
525285
525591
|
getLogWriter(path24).write(messageWithTimestamp);
|
|
525286
525592
|
}
|
|
@@ -528258,7 +528564,7 @@ function getTelemetryAttributes() {
|
|
|
528258
528564
|
attributes["session.id"] = sessionId;
|
|
528259
528565
|
}
|
|
528260
528566
|
if (shouldIncludeAttribute("OTEL_METRICS_INCLUDE_VERSION")) {
|
|
528261
|
-
attributes["app.version"] = "1.0.0-alpha.
|
|
528567
|
+
attributes["app.version"] = "1.0.0-alpha.25";
|
|
528262
528568
|
}
|
|
528263
528569
|
if (envDynamic.terminal) {
|
|
528264
528570
|
attributes["terminal.type"] = envDynamic.terminal;
|
|
@@ -538402,7 +538708,7 @@ function buildSystemInitMessage(inputs) {
|
|
|
538402
538708
|
slash_commands: inputs.commands.filter((c5) => c5.userInvocable !== false).map((c5) => c5.name),
|
|
538403
538709
|
apiKeySource: getAnthropicApiKeyWithSource().source,
|
|
538404
538710
|
betas: getSdkBetas(),
|
|
538405
|
-
claude_code_version: "1.0.0-alpha.
|
|
538711
|
+
claude_code_version: "1.0.0-alpha.25",
|
|
538406
538712
|
output_style: outputStyle2,
|
|
538407
538713
|
agents: inputs.agents.map((agent) => agent.agentType),
|
|
538408
538714
|
skills: inputs.skills.filter((s2) => s2.userInvocable !== false).map((skill) => skill.name),
|
|
@@ -560871,7 +561177,7 @@ function buildStatusLineCommandInput(permissionMode, exceeds200kTokens, settings
|
|
|
560871
561177
|
project_dir: getOriginalCwd(),
|
|
560872
561178
|
added_dirs: addedDirs
|
|
560873
561179
|
},
|
|
560874
|
-
version: "1.0.0-alpha.
|
|
561180
|
+
version: "1.0.0-alpha.25",
|
|
560875
561181
|
output_style: {
|
|
560876
561182
|
name: outputStyleName
|
|
560877
561183
|
},
|
|
@@ -584227,7 +584533,7 @@ function WelcomeV2() {
|
|
|
584227
584533
|
dimColor: true,
|
|
584228
584534
|
children: [
|
|
584229
584535
|
"v",
|
|
584230
|
-
"1.0.0-alpha.
|
|
584536
|
+
"1.0.0-alpha.25",
|
|
584231
584537
|
" "
|
|
584232
584538
|
]
|
|
584233
584539
|
})
|
|
@@ -584427,7 +584733,7 @@ function WelcomeV2() {
|
|
|
584427
584733
|
dimColor: true,
|
|
584428
584734
|
children: [
|
|
584429
584735
|
"v",
|
|
584430
|
-
"1.0.0-alpha.
|
|
584736
|
+
"1.0.0-alpha.25",
|
|
584431
584737
|
" "
|
|
584432
584738
|
]
|
|
584433
584739
|
})
|
|
@@ -584653,7 +584959,7 @@ function AppleTerminalWelcomeV2(t0) {
|
|
|
584653
584959
|
dimColor: true,
|
|
584654
584960
|
children: [
|
|
584655
584961
|
"v",
|
|
584656
|
-
"1.0.0-alpha.
|
|
584962
|
+
"1.0.0-alpha.25",
|
|
584657
584963
|
" "
|
|
584658
584964
|
]
|
|
584659
584965
|
});
|
|
@@ -584907,7 +585213,7 @@ function AppleTerminalWelcomeV2(t0) {
|
|
|
584907
585213
|
dimColor: true,
|
|
584908
585214
|
children: [
|
|
584909
585215
|
"v",
|
|
584910
|
-
"1.0.0-alpha.
|
|
585216
|
+
"1.0.0-alpha.25",
|
|
584911
585217
|
" "
|
|
584912
585218
|
]
|
|
584913
585219
|
});
|
|
@@ -586373,7 +586679,7 @@ function completeOnboarding() {
|
|
|
586373
586679
|
saveGlobalConfig((current) => ({
|
|
586374
586680
|
...current,
|
|
586375
586681
|
hasCompletedOnboarding: true,
|
|
586376
|
-
lastOnboardingVersion: "1.0.0-alpha.
|
|
586682
|
+
lastOnboardingVersion: "1.0.0-alpha.25"
|
|
586377
586683
|
}));
|
|
586378
586684
|
}
|
|
586379
586685
|
function showDialog(root3, renderer) {
|
|
@@ -594836,8 +595142,8 @@ async function getEnvLessBridgeConfig() {
|
|
|
594836
595142
|
}
|
|
594837
595143
|
async function checkEnvLessBridgeMinVersion() {
|
|
594838
595144
|
const cfg = await getEnvLessBridgeConfig();
|
|
594839
|
-
if (cfg.min_version && lt("1.0.0-alpha.
|
|
594840
|
-
return `Your version of Agent-OS (${"1.0.0-alpha.
|
|
595145
|
+
if (cfg.min_version && lt("1.0.0-alpha.25", cfg.min_version)) {
|
|
595146
|
+
return `Your version of Agent-OS (${"1.0.0-alpha.25"}) is too old for Remote Control.
|
|
594841
595147
|
Version ${cfg.min_version} or higher is required. Run \`agent-os update\` to update.`;
|
|
594842
595148
|
}
|
|
594843
595149
|
return null;
|
|
@@ -595310,7 +595616,7 @@ async function initBridgeCore(params) {
|
|
|
595310
595616
|
const rawApi = createBridgeApiClient({
|
|
595311
595617
|
baseUrl,
|
|
595312
595618
|
getAccessToken,
|
|
595313
|
-
runnerVersion: "1.0.0-alpha.
|
|
595619
|
+
runnerVersion: "1.0.0-alpha.25",
|
|
595314
595620
|
onDebug: logForDebugging,
|
|
595315
595621
|
onAuth401,
|
|
595316
595622
|
getTrustedDeviceToken
|
|
@@ -600989,7 +601295,7 @@ async function startMCPServer(cwd3, debug2, verbose) {
|
|
|
600989
601295
|
setCwd(cwd3);
|
|
600990
601296
|
const server = new Server({
|
|
600991
601297
|
name: "claude/tengu",
|
|
600992
|
-
version: "1.0.0-alpha.
|
|
601298
|
+
version: "1.0.0-alpha.25"
|
|
600993
601299
|
}, {
|
|
600994
601300
|
capabilities: {
|
|
600995
601301
|
tools: {}
|
|
@@ -606500,7 +606806,7 @@ ${customInstructions}` : customInstructions;
|
|
|
606500
606806
|
}
|
|
606501
606807
|
}
|
|
606502
606808
|
logForDiagnosticsNoPII("info", "started", {
|
|
606503
|
-
version: "1.0.0-alpha.
|
|
606809
|
+
version: "1.0.0-alpha.25",
|
|
606504
606810
|
is_native_binary: isInBundledMode()
|
|
606505
606811
|
});
|
|
606506
606812
|
registerCleanup(async () => {
|
|
@@ -607292,7 +607598,7 @@ Usage: agent-os --remote "your task description"`, () => gracefulShutdown(1));
|
|
|
607292
607598
|
pendingHookMessages
|
|
607293
607599
|
}, renderAndRun);
|
|
607294
607600
|
}
|
|
607295
|
-
}).version("1.0.0-alpha.
|
|
607601
|
+
}).version("1.0.0-alpha.25 (Agent-OS)", "-v, --version", "Output the version number");
|
|
607296
607602
|
program2.option("-w, --worktree [name]", "Create a new git worktree for this session (optionally specify a name)");
|
|
607297
607603
|
program2.option("--tmux", "Create a tmux session for the worktree (requires --worktree). Uses iTerm2 native panes when available; use --tmux=classic for traditional tmux.");
|
|
607298
607604
|
if (canUserConfigureAdvisor()) {
|
|
@@ -609130,7 +609436,7 @@ if (false) {}
|
|
|
609130
609436
|
async function main2() {
|
|
609131
609437
|
const args = process.argv.slice(2);
|
|
609132
609438
|
if (args.length === 1 && (args[0] === "--version" || args[0] === "-v" || args[0] === "-V")) {
|
|
609133
|
-
console.log(`${"1.0.0-alpha.
|
|
609439
|
+
console.log(`${"1.0.0-alpha.25"} (Agent-OS)`);
|
|
609134
609440
|
return;
|
|
609135
609441
|
}
|
|
609136
609442
|
const {
|