nolo-cli 0.27.0 → 0.28.0
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/{_executeModel-GBJY45QW.js → _executeModel-SUMILI7E.js} +13 -13
- package/{agentDeleteCommand-VFHDZJG3.js → agentDeleteCommand-GEHAXWM6.js} +7 -7
- package/{agentEmailCommands-NV64EI7G.js → agentEmailCommands-PQXAKGK2.js} +17 -17
- package/{agentListCommands-BDDUYHLP.js → agentListCommands-V2IIWNTX.js} +8 -8
- package/{agentMachineCommands-2KYBYNLE.js → agentMachineCommands-Y47CABE2.js} +7 -7
- package/{agentRecordCommands-3OX576G3.js → agentRecordCommands-UYUJUT4K.js} +16 -16
- package/{agentRunCommand-FZOGN67Y.js → agentRunCommand-3P6CCJQK.js} +17 -17
- package/{agentRuntimeLocal-552R4CZA.js → agentRuntimeLocal-ZALQDCZ3.js} +4 -4
- package/{agentSlice-7AEBCNVZ.js → agentSlice-LH2YKWE7.js} +1 -1
- package/{appDeleteCommands-IPJT6IYW.js → appDeleteCommands-XELAKISE.js} +8 -8
- package/{appDeployCommands-24P4CADQ.js → appDeployCommands-PFHVHXJ3.js} +8 -8
- package/{appDeployStatusCommands-3DRZOUAG.js → appDeployStatusCommands-RULB3DGE.js} +8 -8
- package/{appGetCommands-JEOSBLUL.js → appGetCommands-A3NLQ2U5.js} +8 -8
- package/{appListCommands-EIBM54WR.js → appListCommands-NQLJ7RHY.js} +8 -8
- package/{authCommand-MKMYHD52.js → authCommand-XMQHBK5L.js} +470 -40
- package/chunk-2FX23RGA.js +162 -0
- package/{chunk-6MBOZ4UP.js → chunk-2TYLTEAH.js} +1 -1
- package/{chunk-W2IOPRHX.js → chunk-4O2L6YR5.js} +3 -3
- package/{chunk-X43U4JUJ.js → chunk-4UYKPT74.js} +1 -1
- package/{chunk-TTPVLL5F.js → chunk-7IX2Z2IF.js} +8 -8
- package/{chunk-3X4IYB22.js → chunk-7OYY7W4W.js} +2 -2
- package/{chunk-ZNFZGHKL.js → chunk-7ZKK4F22.js} +1 -1
- package/{chunk-YZV4676I.js → chunk-A6WDXLAG.js} +2 -2
- package/{chunk-KXEWHQAW.js → chunk-ATGTWONB.js} +1 -1
- package/{chunk-Z3ORPMOA.js → chunk-BTA2CW6H.js} +6 -6
- package/{chunk-J7PB5GXH.js → chunk-D36OKPFG.js} +1 -1
- package/{chunk-56CPK6JE.js → chunk-D5D3XTWF.js} +30 -35
- package/{chunk-V7BUGVT2.js → chunk-E4XWECLB.js} +2 -2
- package/{chunk-UADEEVDX.js → chunk-HTLBU4ZY.js} +5 -5
- package/{chunk-N32A423D.js → chunk-IVMPWUAR.js} +2 -2
- package/{chunk-O5VFD7V6.js → chunk-MSXDPLDQ.js} +1 -1
- package/{chunk-NCRWA6ZB.js → chunk-MY54LNPC.js} +2 -2
- package/{chunk-4FRIAKSZ.js → chunk-OMN2LILO.js} +1 -1
- package/{chunk-7OYLPHDL.js → chunk-PASYOZYI.js} +22 -65
- package/{chunk-AL2V7U3E.js → chunk-PJY5AH5A.js} +25 -8
- package/chunk-PSK2RUHV.js +529 -0
- package/{chunk-Q4TAIQTA.js → chunk-QUXMWSCQ.js} +21 -47
- package/{chunk-PVWFM7JP.js → chunk-RRWRVIQU.js} +1 -1
- package/{chunk-QCUS52YR.js → chunk-SFFG3HJH.js} +3 -3
- package/{chunk-7WMLPRXP.js → chunk-UP7UFQOH.js} +1 -1
- package/{chunk-VV4TYWNV.js → chunk-WX3ZOSTL.js} +376 -656
- package/{chunk-HQFXBRI2.js → chunk-XMAELUQW.js} +11 -11
- package/{chunk-7OBMZCRD.js → chunk-ZVZMT3EA.js} +7 -5
- package/{createAgentAutomationAction-YB65NAU5.js → createAgentAutomationAction-FAYQK5ME.js} +2 -2
- package/{createDialogAction-6USRBKKL.js → createDialogAction-NDBK6IQG.js} +3 -3
- package/{createPageAction-ZGE3SG6J.js → createPageAction-CQTLV7FP.js} +2 -2
- package/{dialogCommands-O4CJJRTQ.js → dialogCommands-ZR42K2M5.js} +8 -8
- package/{dialogSlice-HMRBZCSE.js → dialogSlice-ZLGEYKLO.js} +2 -2
- package/{docCreateCommands-2U5AIF3O.js → docCreateCommands-2WXA3BCQ.js} +7 -7
- package/{docDeleteCommands-EDCAUQEF.js → docDeleteCommands-HSL7CD32.js} +8 -8
- package/{docReadCommands-KFMBFGPY.js → docReadCommands-YSPUU2DP.js} +7 -7
- package/{docStore-ZGGDZFCC.js → docStore-LJQIY2ZU.js} +3 -3
- package/{docUpdateCommands-57M4XOT7.js → docUpdateCommands-EFYOIVM7.js} +7 -7
- package/{handleSendMessageAction-ANCZXLQY.js → handleSendMessageAction-JL6GGVNW.js} +2 -2
- package/index.js +46 -46
- package/{machineCommands-6EG5U6TU.js → machineCommands-VAANUFNC.js} +15 -15
- package/{machineWsRunDispatch-SFIKRI4G.js → machineWsRunDispatch-ABWV2WZO.js} +15 -15
- package/package.json +1 -1
- package/{readlineWorkspace-TVIHBRN2.js → readlineWorkspace-GQI3XP5E.js} +41 -44
- package/{runAgentClientLoop-SJ6QQ3ZS.js → runAgentClientLoop-U632N2KO.js} +9 -9
- package/{skillDiscovery-KJWT7JBU.js → skillDiscovery-ITA7BI7A.js} +4 -2
- package/{spaceCommands-XK46FRYG.js → spaceCommands-DE6KNJIV.js} +7 -7
- package/{spaceSlice-FNFNVXPQ.js → spaceSlice-QTMWWQHQ.js} +2 -2
- package/{streamAgentChatTurn-HHIWP44U.js → streamAgentChatTurn-VU7BM3K3.js} +12 -12
- package/{tools-CT7AFBI3.js → tools-LSIS6NY6.js} +5 -5
- package/{updateDialogTitleAction-7RFN5GA4.js → updateDialogTitleAction-T77A54DE.js} +2 -2
- package/chunk-UTYJ47H2.js +0 -51
- package/chunk-ZJ7WLPDP.js +0 -553
|
@@ -0,0 +1,162 @@
|
|
|
1
|
+
import {
|
|
2
|
+
trimTrailingSlash
|
|
3
|
+
} from "./chunk-XS7UPVR7.js";
|
|
4
|
+
import {
|
|
5
|
+
toErrorMessage
|
|
6
|
+
} from "./chunk-HNMXYYJR.js";
|
|
7
|
+
import {
|
|
8
|
+
asOptionalFiniteNumber
|
|
9
|
+
} from "./chunk-WWC7I6TA.js";
|
|
10
|
+
import {
|
|
11
|
+
asTrimmedLowercaseString
|
|
12
|
+
} from "./chunk-QSJ3HFEF.js";
|
|
13
|
+
import {
|
|
14
|
+
asOptionalTrimmedString
|
|
15
|
+
} from "./chunk-G3SUCT4W.js";
|
|
16
|
+
|
|
17
|
+
// packages/agent-runtime/antigravityOAuth.ts
|
|
18
|
+
var decodeBase64 = (s) => Buffer.from(s, "base64").toString("utf8");
|
|
19
|
+
var ANTIGRAVITY_CLIENT_ID = decodeBase64(
|
|
20
|
+
"MTA3MTAwNjA2MDU5MS10bWhzc2luMmgyMWxjcmUyMzV2dG9sb2poNGc0MDNlcC5hcHBzLmdvb2dsZXVzZXJjb250ZW50LmNvbQ=="
|
|
21
|
+
);
|
|
22
|
+
var ANTIGRAVITY_CLIENT_SECRET = decodeBase64(
|
|
23
|
+
"R09DU1BYLUs1OEZXUjQ4NkxkTEoxbUxCOHNYQzR6NnFEQWY="
|
|
24
|
+
);
|
|
25
|
+
var ANTIGRAVITY_AUTH_URL = "https://accounts.google.com/o/oauth2/v2/auth";
|
|
26
|
+
var ANTIGRAVITY_TOKEN_URL = "https://oauth2.googleapis.com/token";
|
|
27
|
+
var ANTIGRAVITY_USERINFO_URL = "https://www.googleapis.com/oauth2/v1/userinfo?alt=json";
|
|
28
|
+
var ANTIGRAVITY_CALLBACK_PORT = 51121;
|
|
29
|
+
var ANTIGRAVITY_CALLBACK_PATH = "/oauth-callback";
|
|
30
|
+
var ANTIGRAVITY_CALLBACK_URL = `http://127.0.0.1:${ANTIGRAVITY_CALLBACK_PORT}${ANTIGRAVITY_CALLBACK_PATH}`;
|
|
31
|
+
var ANTIGRAVITY_SCOPES = [
|
|
32
|
+
"https://www.googleapis.com/auth/cloud-platform",
|
|
33
|
+
"https://www.googleapis.com/auth/userinfo.email",
|
|
34
|
+
"https://www.googleapis.com/auth/userinfo.profile",
|
|
35
|
+
"https://www.googleapis.com/auth/cclog",
|
|
36
|
+
"https://www.googleapis.com/auth/experimentsandconfigs"
|
|
37
|
+
];
|
|
38
|
+
var ANTIGRAVITY_ACCESS_TOKEN_CLIENT_SKEW_MS = 5 * 60 * 1e3;
|
|
39
|
+
var ANTIGRAVITY_TOKEN_REQUEST_TIMEOUT_MS = 3e4;
|
|
40
|
+
var ANTIGRAVITY_CLOUD_CODE_BASE_URL = "https://daily-cloudcode-pa.googleapis.com";
|
|
41
|
+
var ANTIGRAVITY_CLOUD_CODE_HOST = "cloudcode-pa.googleapis.com";
|
|
42
|
+
var ANTIGRAVITY_LEGACY_GENERIC_BASE_RE = /^https?:\/\/cloudcode-pa\.googleapis\.com$/i;
|
|
43
|
+
function getAntigravityUserAgent() {
|
|
44
|
+
const version = process.env.NOLO_ANTIGRAVITY_VERSION || "2.1.4";
|
|
45
|
+
const os = process.platform === "win32" ? "windows" : process.platform;
|
|
46
|
+
const arch = process.arch === "x64" ? "amd64" : process.arch === "ia32" ? "386" : process.arch;
|
|
47
|
+
return `antigravity/hub/${version} ${os}/${arch}`;
|
|
48
|
+
}
|
|
49
|
+
function resolveAntigravityCloudCodeBaseUrl(customProviderUrl) {
|
|
50
|
+
const raw = (customProviderUrl ?? "").trim();
|
|
51
|
+
if (!raw) return ANTIGRAVITY_CLOUD_CODE_BASE_URL;
|
|
52
|
+
const trimmed = trimTrailingSlash(raw);
|
|
53
|
+
if (trimmed.includes(ANTIGRAVITY_CLOUD_CODE_HOST)) {
|
|
54
|
+
const base = trimmed.replace(/\/v1internal:.*$/i, "").replace(/\/$/, "");
|
|
55
|
+
if (ANTIGRAVITY_LEGACY_GENERIC_BASE_RE.test(base)) {
|
|
56
|
+
return ANTIGRAVITY_CLOUD_CODE_BASE_URL;
|
|
57
|
+
}
|
|
58
|
+
return base;
|
|
59
|
+
}
|
|
60
|
+
return ANTIGRAVITY_CLOUD_CODE_BASE_URL;
|
|
61
|
+
}
|
|
62
|
+
function isAntigravityOAuthAgent(agentConfig) {
|
|
63
|
+
if (!agentConfig) return false;
|
|
64
|
+
const apiKeyRef = asTrimmedLowercaseString(agentConfig.apiKeyRef);
|
|
65
|
+
const provider = asTrimmedLowercaseString(agentConfig.provider);
|
|
66
|
+
const url = asTrimmedLowercaseString(agentConfig.customProviderUrl);
|
|
67
|
+
return apiKeyRef === "antigravity" || provider === "google-antigravity" || url.includes(ANTIGRAVITY_CLOUD_CODE_HOST);
|
|
68
|
+
}
|
|
69
|
+
function readAntigravityProjectId(metadata) {
|
|
70
|
+
return asOptionalTrimmedString(metadata?.projectId);
|
|
71
|
+
}
|
|
72
|
+
function normalizeAntigravityTokenPayload(args) {
|
|
73
|
+
const {
|
|
74
|
+
payload,
|
|
75
|
+
baseCredential,
|
|
76
|
+
now = Date.now(),
|
|
77
|
+
clientSkewMs = ANTIGRAVITY_ACCESS_TOKEN_CLIENT_SKEW_MS
|
|
78
|
+
} = args;
|
|
79
|
+
if (typeof payload.access_token !== "string" || !payload.access_token.trim()) {
|
|
80
|
+
throw new Error("Antigravity token response missing access_token");
|
|
81
|
+
}
|
|
82
|
+
const accessToken = payload.access_token.trim();
|
|
83
|
+
const expiresIn = asOptionalFiniteNumber(payload.expires_in);
|
|
84
|
+
const expiresAt = expiresIn !== void 0 ? now + expiresIn * 1e3 - clientSkewMs : baseCredential?.expiresAt;
|
|
85
|
+
const refreshToken = typeof payload.refresh_token === "string" && payload.refresh_token.trim() ? payload.refresh_token.trim() : baseCredential?.refreshToken;
|
|
86
|
+
const scope = typeof payload.scope === "string" && payload.scope.trim() ? payload.scope.trim() : baseCredential?.scope;
|
|
87
|
+
return {
|
|
88
|
+
...baseCredential ?? {},
|
|
89
|
+
provider: baseCredential?.provider ?? "antigravity",
|
|
90
|
+
accessToken,
|
|
91
|
+
...refreshToken ? { refreshToken } : {},
|
|
92
|
+
...expiresAt !== void 0 ? { expiresAt } : {},
|
|
93
|
+
...scope ? { scope } : {},
|
|
94
|
+
obtainedAt: now
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
async function refreshAntigravityToken(credential, deps = {}) {
|
|
98
|
+
if (!credential.refreshToken || !credential.refreshToken.trim()) {
|
|
99
|
+
throw new Error("Antigravity credential has no refresh_token");
|
|
100
|
+
}
|
|
101
|
+
const fetchImpl = deps.fetchImpl ?? fetch;
|
|
102
|
+
let response;
|
|
103
|
+
try {
|
|
104
|
+
response = await fetchImpl(ANTIGRAVITY_TOKEN_URL, {
|
|
105
|
+
method: "POST",
|
|
106
|
+
headers: {
|
|
107
|
+
"Content-Type": "application/x-www-form-urlencoded",
|
|
108
|
+
Accept: "application/json"
|
|
109
|
+
},
|
|
110
|
+
body: new URLSearchParams({
|
|
111
|
+
client_id: ANTIGRAVITY_CLIENT_ID,
|
|
112
|
+
client_secret: ANTIGRAVITY_CLIENT_SECRET,
|
|
113
|
+
refresh_token: credential.refreshToken.trim(),
|
|
114
|
+
grant_type: "refresh_token"
|
|
115
|
+
}),
|
|
116
|
+
signal: AbortSignal.timeout(ANTIGRAVITY_TOKEN_REQUEST_TIMEOUT_MS)
|
|
117
|
+
});
|
|
118
|
+
} catch (error) {
|
|
119
|
+
throw new Error(
|
|
120
|
+
`Antigravity token refresh failed: ${toErrorMessage(error)}`
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
let rawBodyText = "";
|
|
124
|
+
let payload;
|
|
125
|
+
try {
|
|
126
|
+
rawBodyText = await response.text();
|
|
127
|
+
payload = rawBodyText ? JSON.parse(rawBodyText) : {};
|
|
128
|
+
} catch {
|
|
129
|
+
payload = {};
|
|
130
|
+
}
|
|
131
|
+
if (!response.ok) {
|
|
132
|
+
const detail = typeof payload.error_description === "string" && payload.error_description.trim() ? payload.error_description.trim() : typeof payload.error === "string" && payload.error.trim() ? payload.error.trim() : rawBodyText.trim() || `HTTP ${response.status}`;
|
|
133
|
+
throw new Error(`Antigravity token refresh failed: ${detail}`);
|
|
134
|
+
}
|
|
135
|
+
if (typeof payload.access_token !== "string" || !payload.access_token.trim()) {
|
|
136
|
+
throw new Error("Antigravity token refresh response missing access_token");
|
|
137
|
+
}
|
|
138
|
+
const now = deps.now?.() ?? Date.now();
|
|
139
|
+
return normalizeAntigravityTokenPayload({
|
|
140
|
+
payload,
|
|
141
|
+
baseCredential: credential,
|
|
142
|
+
now
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export {
|
|
147
|
+
ANTIGRAVITY_CLIENT_ID,
|
|
148
|
+
ANTIGRAVITY_CLIENT_SECRET,
|
|
149
|
+
ANTIGRAVITY_AUTH_URL,
|
|
150
|
+
ANTIGRAVITY_TOKEN_URL,
|
|
151
|
+
ANTIGRAVITY_USERINFO_URL,
|
|
152
|
+
ANTIGRAVITY_CALLBACK_PORT,
|
|
153
|
+
ANTIGRAVITY_CALLBACK_PATH,
|
|
154
|
+
ANTIGRAVITY_SCOPES,
|
|
155
|
+
ANTIGRAVITY_CLOUD_CODE_BASE_URL,
|
|
156
|
+
getAntigravityUserAgent,
|
|
157
|
+
resolveAntigravityCloudCodeBaseUrl,
|
|
158
|
+
isAntigravityOAuthAgent,
|
|
159
|
+
readAntigravityProjectId,
|
|
160
|
+
normalizeAntigravityTokenPayload,
|
|
161
|
+
refreshAntigravityToken
|
|
162
|
+
};
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createCliLocalRuntimeAdapter,
|
|
3
3
|
summarizeEndpoint
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PASYOZYI.js";
|
|
5
5
|
import {
|
|
6
6
|
clipMultilineText
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-XMAELUQW.js";
|
|
8
8
|
import {
|
|
9
9
|
runLocalAgentTurn
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-A6WDXLAG.js";
|
|
11
11
|
import {
|
|
12
12
|
resolveLocalRuntimeEnvFromPolicy
|
|
13
13
|
} from "./chunk-5CS33IBL.js";
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
parseToolArgumentsJson,
|
|
10
10
|
resolveHistoricalToolContentCap
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-A6WDXLAG.js";
|
|
12
12
|
import {
|
|
13
13
|
createThinkParserState,
|
|
14
14
|
createToolCallAccumulator,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
import {
|
|
20
20
|
requiresBareImageUrl,
|
|
21
21
|
toBareImageUrlMessages
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-PSK2RUHV.js";
|
|
23
23
|
import {
|
|
24
24
|
shouldStripReasoningContentForOutbound,
|
|
25
25
|
toOpenAiCompatibleMessages
|
|
@@ -1516,7 +1516,7 @@ function buildWorkspacePathProperty() {
|
|
|
1516
1516
|
return {
|
|
1517
1517
|
type: "string",
|
|
1518
1518
|
minLength: 1,
|
|
1519
|
-
description: "Path relative to the workspace root.
|
|
1519
|
+
description: "Path relative to the workspace root. Defaults to workspace root when omitted."
|
|
1520
1520
|
};
|
|
1521
1521
|
}
|
|
1522
1522
|
function buildListWorkspaceDescription(variant) {
|
|
@@ -1889,17 +1889,17 @@ function buildExecShellTool(toolName) {
|
|
|
1889
1889
|
type: "function",
|
|
1890
1890
|
function: {
|
|
1891
1891
|
name: toolName,
|
|
1892
|
-
description: `Execute a shell command from the workspace root. Prefer one compound command (e.g. 'git status && git diff --stat') to perform complete verification instead of multiple small roundtrips. Do not cd into guessed paths
|
|
1892
|
+
description: `Execute a shell command from the workspace root. Prefer one compound command (e.g. 'git status && git diff --stat') to perform complete verification in one step instead of multiple small roundtrips. Do not cd into guessed paths; commands already run from the workspace root. Commands block until exit. Long-running commands (sleep over ${IMMEDIATE_DETACH_SLEEP_THRESHOLD_SECONDS}s, dev servers, watchers) automatically detach to background returning {detached: true, pid, label}; for persistent services, prefer launchProcess.`,
|
|
1893
1893
|
parameters: {
|
|
1894
1894
|
type: "object",
|
|
1895
1895
|
properties: {
|
|
1896
1896
|
cmd: {
|
|
1897
1897
|
type: "string",
|
|
1898
|
-
description: "Shell command to run
|
|
1898
|
+
description: "Shell command to run (non-empty)."
|
|
1899
1899
|
},
|
|
1900
1900
|
command: {
|
|
1901
1901
|
type: "string",
|
|
1902
|
-
description: "
|
|
1902
|
+
description: "Compatibility alias for cmd."
|
|
1903
1903
|
}
|
|
1904
1904
|
}
|
|
1905
1905
|
}
|
|
@@ -4091,7 +4091,7 @@ function buildLoadSkillExecutor(args) {
|
|
|
4091
4091
|
metadata: { loadSkill: true, resolved: false }
|
|
4092
4092
|
};
|
|
4093
4093
|
}
|
|
4094
|
-
const { resolveSkillByName } = await import("./skillDiscovery-
|
|
4094
|
+
const { resolveSkillByName } = await import("./skillDiscovery-ITA7BI7A.js");
|
|
4095
4095
|
const resolved = resolveSkillByName(args.cwd, name);
|
|
4096
4096
|
if (!resolved) {
|
|
4097
4097
|
const { resolveCodingBuiltinSlug, buildCodingSkillContentBySlug } = await import("./codingSkills-EN6Z6G6U.js");
|
|
@@ -4129,7 +4129,7 @@ ${body}`,
|
|
|
4129
4129
|
};
|
|
4130
4130
|
}
|
|
4131
4131
|
async function formatUnknownSkillMessage(cwd, requestedName) {
|
|
4132
|
-
const { discoverSkills } = await import("./skillDiscovery-
|
|
4132
|
+
const { discoverSkills } = await import("./skillDiscovery-ITA7BI7A.js");
|
|
4133
4133
|
let available = [];
|
|
4134
4134
|
try {
|
|
4135
4135
|
available = discoverSkills(cwd).map((s) => s.name);
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
updateContentTitle
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-QUXMWSCQ.js";
|
|
4
4
|
import {
|
|
5
5
|
require_date_fns
|
|
6
6
|
} from "./chunk-M76ECQRD.js";
|
|
@@ -367,7 +367,7 @@ async function saveDocState(arg, { dispatch, getState }) {
|
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
369
|
async function createDocState(args, thunkApi) {
|
|
370
|
-
const { createPageAction } = await import("./createPageAction-
|
|
370
|
+
const { createPageAction } = await import("./createPageAction-CQTLV7FP.js");
|
|
371
371
|
return createPageAction(args, thunkApi);
|
|
372
372
|
}
|
|
373
373
|
function subscribe(listener) {
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
buildIdentityBlock,
|
|
4
4
|
buildRuntimeGuidanceBlocks,
|
|
5
5
|
resolveToolGuidedSections
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-PSK2RUHV.js";
|
|
7
7
|
import {
|
|
8
8
|
estimateTokenCount,
|
|
9
9
|
getModelContextWindow,
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
} from "./chunk-GT3GG2H7.js";
|
|
21
21
|
import {
|
|
22
22
|
buildDialogSummaryLayer
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-PJY5AH5A.js";
|
|
24
24
|
import {
|
|
25
25
|
canonicalizeToolName,
|
|
26
26
|
canonicalizeToolNames
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
inlineImageUrlsForCustomProvider,
|
|
6
6
|
prepareTools,
|
|
7
7
|
shouldInlineImageUrlsForAgent
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-D36OKPFG.js";
|
|
9
9
|
import {
|
|
10
10
|
performFetchRequest
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-HTLBU4ZY.js";
|
|
12
12
|
import {
|
|
13
13
|
createSSEParser,
|
|
14
14
|
createToolRunId,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
toolRunSetPending,
|
|
20
20
|
toolRunStarted,
|
|
21
21
|
toolRunSucceeded
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-XMAELUQW.js";
|
|
23
23
|
import {
|
|
24
24
|
getPublicImageAgentMode
|
|
25
25
|
} from "./chunk-VIDPVFP3.js";
|
|
@@ -29,13 +29,13 @@ import {
|
|
|
29
29
|
messageStreaming,
|
|
30
30
|
selectCurrentSpaceId,
|
|
31
31
|
updateToolMessage
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-QUXMWSCQ.js";
|
|
33
33
|
import {
|
|
34
34
|
streamAgentChatTurn
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-SFFG3HJH.js";
|
|
36
36
|
import {
|
|
37
37
|
EMPTY_ASSISTANT_REPAIR_PROMPT
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-A6WDXLAG.js";
|
|
39
39
|
import {
|
|
40
40
|
accumulateToolCallDelta,
|
|
41
41
|
createThinkParserState,
|
|
@@ -19,7 +19,7 @@ import {
|
|
|
19
19
|
parseAgentRunEvent,
|
|
20
20
|
t,
|
|
21
21
|
toolLabel
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-PASYOZYI.js";
|
|
23
23
|
import {
|
|
24
24
|
getReadableCliDb
|
|
25
25
|
} from "./chunk-WFHXMLHZ.js";
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
normalizeAgentHandle,
|
|
28
28
|
readDbRecord,
|
|
29
29
|
resolveAgentRecordFromHybridStore
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-7ZKK4F22.js";
|
|
31
31
|
import {
|
|
32
32
|
NOLO_PROJECT_MANAGER_AGENT_KEY,
|
|
33
33
|
isLocalCliAgentKey
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
} from "./chunk-LTRXGFMS.js";
|
|
39
39
|
import {
|
|
40
40
|
formatAgentListCard
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-XMAELUQW.js";
|
|
42
42
|
import {
|
|
43
43
|
isGatewayHttpStatus
|
|
44
44
|
} from "./chunk-RQSOAMPJ.js";
|
|
@@ -50,15 +50,15 @@ import {
|
|
|
50
50
|
chooseMemoryOwners,
|
|
51
51
|
loadMemoryCandidatesFromDb,
|
|
52
52
|
resolveAgentMemoryPolicy
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-IVMPWUAR.js";
|
|
54
54
|
import {
|
|
55
55
|
API_REPORTED_COST_MULTIPLIER,
|
|
56
56
|
normalizeUsage,
|
|
57
57
|
parseUiAskChoiceContent
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-QUXMWSCQ.js";
|
|
59
59
|
import {
|
|
60
|
-
|
|
61
|
-
} from "./chunk-
|
|
60
|
+
buildSkillDiscoveryContextLayer
|
|
61
|
+
} from "./chunk-ZVZMT3EA.js";
|
|
62
62
|
import {
|
|
63
63
|
parseExternalSkillMarkdown,
|
|
64
64
|
parseSkillDocProtocol
|
|
@@ -71,7 +71,7 @@ import {
|
|
|
71
71
|
LOCAL_TURN_ABORTED_CODE,
|
|
72
72
|
readActionGate,
|
|
73
73
|
readCommandActionGatePayload
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-A6WDXLAG.js";
|
|
75
75
|
import {
|
|
76
76
|
createThinkParserState,
|
|
77
77
|
flushThinkParser,
|
|
@@ -91,9 +91,12 @@ import {
|
|
|
91
91
|
findModelConfig
|
|
92
92
|
} from "./chunk-GT3GG2H7.js";
|
|
93
93
|
import {
|
|
94
|
+
buildAgentsMdLayer,
|
|
94
95
|
buildMemoryOverlayLayer,
|
|
95
|
-
buildMemoryUseGuidanceLayer
|
|
96
|
-
|
|
96
|
+
buildMemoryUseGuidanceLayer,
|
|
97
|
+
partitionScopedBlocks,
|
|
98
|
+
renderTurnContextBlocksWithScope
|
|
99
|
+
} from "./chunk-PJY5AH5A.js";
|
|
97
100
|
import {
|
|
98
101
|
compactWhitespace
|
|
99
102
|
} from "./chunk-DWLEOOGR.js";
|
|
@@ -3480,7 +3483,7 @@ function findCollapsedPasteSpanAt(buffer, pos, opts = {}) {
|
|
|
3480
3483
|
// packages/cli/client/agentRun.ts
|
|
3481
3484
|
import { ulid } from "ulid";
|
|
3482
3485
|
async function loadRunLocalAgentTurn() {
|
|
3483
|
-
const { runLocalAgentTurn } = await import("./agentRuntimeLocal-
|
|
3486
|
+
const { runLocalAgentTurn } = await import("./agentRuntimeLocal-ZALQDCZ3.js");
|
|
3484
3487
|
return runLocalAgentTurn;
|
|
3485
3488
|
}
|
|
3486
3489
|
async function resolveCurrentMachineId(options) {
|
|
@@ -4966,6 +4969,8 @@ async function runAgentRunCommand(args, deps) {
|
|
|
4966
4969
|
}
|
|
4967
4970
|
const cliCwd = parsed.cwd ?? process.cwd();
|
|
4968
4971
|
const isSubtask = isSubtaskRun(env);
|
|
4972
|
+
const scopedLayers = [];
|
|
4973
|
+
const skillContentBlocks = [];
|
|
4969
4974
|
const extraContextBlocks = [];
|
|
4970
4975
|
const contextBlockScopes = [];
|
|
4971
4976
|
let memoryPromptBlock = null;
|
|
@@ -4982,18 +4987,14 @@ async function runAgentRunCommand(args, deps) {
|
|
|
4982
4987
|
if (Buffer.byteLength(mdContent, "utf8") > AGENTS_MD_MAX) {
|
|
4983
4988
|
mdContent = Buffer.from(mdContent, "utf8").subarray(0, AGENTS_MD_MAX).toString("utf8") + "\n\n<!-- AGENTS.md truncated -->";
|
|
4984
4989
|
}
|
|
4985
|
-
|
|
4986
|
-
${mdContent}`);
|
|
4990
|
+
scopedLayers.push(buildAgentsMdLayer(mdContent, name));
|
|
4987
4991
|
break;
|
|
4988
4992
|
} catch {
|
|
4989
4993
|
}
|
|
4990
4994
|
}
|
|
4991
4995
|
}
|
|
4992
|
-
|
|
4993
|
-
|
|
4994
|
-
if (skillDiscoveryBlock) {
|
|
4995
|
-
extraContextBlocks.push(skillDiscoveryBlock);
|
|
4996
|
-
}
|
|
4996
|
+
skillContentBlocks.push(...buildSkillContextBlocks(skillReferences));
|
|
4997
|
+
scopedLayers.push(buildSkillDiscoveryContextLayer(cliCwd));
|
|
4997
4998
|
if (!deps.memoryRecallDisabled) {
|
|
4998
4999
|
const memoryServerUrl = resolveServerUrl(env);
|
|
4999
5000
|
const memoryAuthToken = resolveAuthToken(args, env);
|
|
@@ -5041,23 +5042,17 @@ ${mdContent}`);
|
|
|
5041
5042
|
}
|
|
5042
5043
|
memoryOverlayLayer = buildMemoryOverlayLayer({ promptBlock: memoryPromptBlock });
|
|
5043
5044
|
memoryUseGuidanceLayer = buildMemoryUseGuidanceLayer({ promptBlock: memoryPromptBlock });
|
|
5044
|
-
|
|
5045
|
-
|
|
5046
|
-
|
|
5047
|
-
|
|
5048
|
-
|
|
5049
|
-
|
|
5050
|
-
|
|
5051
|
-
|
|
5052
|
-
|
|
5053
|
-
|
|
5054
|
-
|
|
5055
|
-
contextBlockScopes.push({ content: block, cacheScope: "turn" });
|
|
5056
|
-
}
|
|
5057
|
-
}
|
|
5058
|
-
if (memoryOverlayLayer?.content?.trim()) {
|
|
5059
|
-
contextBlockScopes.push({ content: memoryOverlayLayer.content, cacheScope: "turn" });
|
|
5060
|
-
}
|
|
5045
|
+
contextBlockScopes.push(
|
|
5046
|
+
...partitionScopedBlocks([
|
|
5047
|
+
...renderTurnContextBlocksWithScope([
|
|
5048
|
+
...scopedLayers,
|
|
5049
|
+
memoryUseGuidanceLayer
|
|
5050
|
+
]),
|
|
5051
|
+
...skillContentBlocks.map((content) => content.trim()).filter((content) => content.length > 0).map((content) => ({ content, cacheScope: "turn" })),
|
|
5052
|
+
...renderTurnContextBlocksWithScope([memoryOverlayLayer])
|
|
5053
|
+
])
|
|
5054
|
+
);
|
|
5055
|
+
extraContextBlocks.push(...contextBlockScopes.map((block) => block.content));
|
|
5061
5056
|
}
|
|
5062
5057
|
const buildRunOptions = (targetAgentKey) => ({
|
|
5063
5058
|
agentName: targetAgentKey,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
clearCliLocalRuntimePreparedAgentCache
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-PASYOZYI.js";
|
|
4
4
|
import {
|
|
5
5
|
getReadableCliDb
|
|
6
6
|
} from "./chunk-WFHXMLHZ.js";
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
resolveAgentRecordFromHybridStore,
|
|
13
13
|
sanitizeAgentRecordForCliOutput,
|
|
14
14
|
writeAgentRecord
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-7ZKK4F22.js";
|
|
16
16
|
import {
|
|
17
17
|
resolveCliAgentKeyInput
|
|
18
18
|
} from "./chunk-VHBWHNVT.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ANTIGRAVITY_CLOUD_CODE_BASE_URL,
|
|
3
3
|
isAntigravityOAuthAgent
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-2FX23RGA.js";
|
|
5
5
|
import {
|
|
6
6
|
clipMultilineText,
|
|
7
7
|
fetchAndSerializeTable,
|
|
8
8
|
resolveBuiltinSkillPage,
|
|
9
9
|
waitForAbortableDelay
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-XMAELUQW.js";
|
|
11
11
|
import {
|
|
12
12
|
createDrainExhaustedResponse,
|
|
13
13
|
isCoreDrainingBody,
|
|
@@ -23,10 +23,10 @@ import {
|
|
|
23
23
|
} from "./chunk-VP4WJWKW.js";
|
|
24
24
|
import {
|
|
25
25
|
fetchAndCacheMessages
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-QUXMWSCQ.js";
|
|
27
27
|
import {
|
|
28
28
|
fetchServerSyncedCredential
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-SFFG3HJH.js";
|
|
30
30
|
import {
|
|
31
31
|
shouldUseServerProxy
|
|
32
32
|
} from "./chunk-YYLHWIW6.js";
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
requiresBareImageUrl,
|
|
43
43
|
resolveToolGuidedSections,
|
|
44
44
|
toBareImageUrlMessages
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-PSK2RUHV.js";
|
|
46
46
|
import {
|
|
47
47
|
convertMessagesToResponsesInput,
|
|
48
48
|
preserveAgentStateFields
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
prepareAndPersistMessage,
|
|
4
4
|
uiAskChoiceFunc,
|
|
5
5
|
uiAskChoiceFunctionSchema
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-QUXMWSCQ.js";
|
|
7
7
|
import {
|
|
8
8
|
require_date_fns
|
|
9
9
|
} from "./chunk-M76ECQRD.js";
|
|
@@ -340,7 +340,7 @@ function resolveAgentMemoryPolicy(input) {
|
|
|
340
340
|
function buildMemorySubjectsForAgent(input) {
|
|
341
341
|
const policy = input.policy ?? resolveAgentMemoryPolicy({ agentKey: input.agentKey });
|
|
342
342
|
const result = [];
|
|
343
|
-
const agentSubject = input.memorySubjectId?.trim();
|
|
343
|
+
const agentSubject = input.memorySubjectId?.trim() || input.agentKey.trim();
|
|
344
344
|
if (agentSubject) {
|
|
345
345
|
result.push({ subjectType: "agent", subjectId: agentSubject });
|
|
346
346
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
listUserRecordsFromServers,
|
|
3
3
|
readLiveDbRecordAfterTombstoneMerge
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-ATGTWONB.js";
|
|
5
5
|
import {
|
|
6
6
|
agentRecordHasConfiguredCredential
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-7ZKK4F22.js";
|
|
8
8
|
import {
|
|
9
9
|
toSafeAgentSummary
|
|
10
10
|
} from "./chunk-H7N2NOJF.js";
|