nolo-cli 0.27.1 → 0.29.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-M6KLIXW5.js → _executeModel-YQ57CFSN.js} +23 -23
- package/{action-5MNAXR5B.js → action-6BM26ZYM.js} +4 -4
- package/{addContentAction-UNSYTVTB.js → addContentAction-HLTFX56O.js} +3 -3
- package/{addDialogAgentAction-LJGNP2AO.js → addDialogAgentAction-Q2TYWDO6.js} +2 -2
- package/{agentDeleteCommand-VFHDZJG3.js → agentDeleteCommand-VP4VLCMG.js} +12 -12
- package/{agentEmailCommands-NQ3SJXZX.js → agentEmailCommands-PSLJLQRR.js} +28 -28
- package/{agentListCommands-BDDUYHLP.js → agentListCommands-MJJJG3OW.js} +13 -13
- package/{agentMachineCommands-5WU7B2UY.js → agentMachineCommands-IP2A26V7.js} +12 -12
- package/{agentRecordCommands-FFFARZTU.js → agentRecordCommands-3HK3AR3H.js} +27 -27
- package/{agentRunCommand-GZYQTIYF.js → agentRunCommand-2IX2ELJQ.js} +28 -28
- package/{agentRuntimeLocal-552R4CZA.js → agentRuntimeLocal-VI3NHLDU.js} +9 -9
- package/{agentSlice-N7E7SG25.js → agentSlice-RR6OT2BW.js} +3 -3
- package/{appDeleteCommands-IPJT6IYW.js → appDeleteCommands-SF2V6QYZ.js} +13 -13
- package/{appDeployCommands-24P4CADQ.js → appDeployCommands-3EPVR545.js} +13 -13
- package/{appDeployStatusCommands-3DRZOUAG.js → appDeployStatusCommands-O65Y747J.js} +13 -13
- package/{appGetCommands-JEOSBLUL.js → appGetCommands-AHDOF4SS.js} +13 -13
- package/{appListCommands-EIBM54WR.js → appListCommands-Y7YCXODU.js} +13 -13
- package/{authCommand-MKMYHD52.js → authCommand-XMQHBK5L.js} +470 -40
- package/chunk-2FX23RGA.js +162 -0
- package/{chunk-ESKT7YVG.js → chunk-2IN43Q72.js} +3 -3
- package/{chunk-6MBOZ4UP.js → chunk-2TYLTEAH.js} +1 -1
- package/{chunk-TTPVLL5F.js → chunk-33K2M3AU.js} +9 -9
- package/{chunk-54VHTARN.js → chunk-3LJ4RSSF.js} +1 -1
- package/{chunk-J2GZXLI7.js → chunk-4S7B6YC5.js} +9 -9
- package/{chunk-I6RJGORZ.js → chunk-BOPFLKHA.js} +1 -1
- package/{chunk-FL42U2NZ.js → chunk-BYHN2CP5.js} +1 -1
- package/{chunk-OXLLFZNF.js → chunk-DBUNOYLF.js} +1 -1
- package/{chunk-S6KVFOUG.js → chunk-ENUJPSZN.js} +2 -2
- package/{chunk-O5VFD7V6.js → chunk-FVY6KI5A.js} +1 -1
- package/{chunk-ZNFZGHKL.js → chunk-I5TJCJQP.js} +1 -1
- package/{chunk-ROJI6DRT.js → chunk-INWBJPQC.js} +2 -2
- package/{chunk-FON47ACC.js → chunk-JYSXE6LE.js} +3 -3
- package/{chunk-C4KV25UH.js → chunk-KJJ6EWVW.js} +28 -69
- package/{chunk-KXEWHQAW.js → chunk-MHHYH3JA.js} +1 -1
- package/{chunk-NCRWA6ZB.js → chunk-NV2VP27U.js} +2 -2
- package/{chunk-YZV4676I.js → chunk-P6TB7JIA.js} +160 -14
- package/{chunk-WCP5FDTF.js → chunk-PFTK5SEB.js} +21 -5
- package/{chunk-PPAJNYFB.js → chunk-PJI44RVC.js} +9 -9
- package/{chunk-AL2V7U3E.js → chunk-PJY5AH5A.js} +25 -8
- package/{chunk-JQ3LNEMS.js → chunk-PMSG3OGF.js} +51 -4
- package/{chunk-NWDOO373.js → chunk-POANOUUC.js} +3 -3
- package/chunk-PSK2RUHV.js +529 -0
- package/{chunk-BAKXXTAC.js → chunk-RLQXGHUQ.js} +2 -2
- package/{chunk-7ORW7XI4.js → chunk-SIZWJA7H.js} +4 -4
- package/{chunk-6V6MYXPV.js → chunk-SRFEVECQ.js} +1 -1
- package/{chunk-7WMLPRXP.js → chunk-STOUEEBU.js} +1 -1
- package/{chunk-4OHJCHIL.js → chunk-VEHCU5XV.js} +35 -105
- package/{chunk-AYQYOZYH.js → chunk-VNMOLPVO.js} +23 -23
- package/{chunk-MALVZUYL.js → chunk-WPRSBZYN.js} +1 -1
- package/{chunk-VV4TYWNV.js → chunk-WX3ZOSTL.js} +376 -656
- package/{chunk-PVWFM7JP.js → chunk-XISENOC2.js} +1 -1
- package/{chunk-X43U4JUJ.js → chunk-YRMUYZ5H.js} +2 -2
- package/{chunk-JMSCXQUG.js → chunk-Z3LLUGD5.js} +1 -1
- package/{chunk-7OBMZCRD.js → chunk-ZVZMT3EA.js} +7 -5
- package/{chunk-4RXTDRTJ.js → chunk-ZXXAMM3K.js} +2 -2
- package/{chunk-MAFUFDFV.js → chunk-ZZYNGFTB.js} +81 -48
- package/{createAgentAutomationAction-GU766YRL.js → createAgentAutomationAction-PIKVVL2R.js} +8 -8
- package/{createDialogAction-ADMDJITX.js → createDialogAction-DQCM7HHO.js} +9 -9
- package/{createPageAction-N7EZJVO5.js → createPageAction-W2DRG2J7.js} +8 -8
- package/{dbSlice-5BKDURDL.js → dbSlice-GOKRGQ47.js} +2 -2
- package/{dialogCommands-O4CJJRTQ.js → dialogCommands-N4XKI6ZU.js} +13 -13
- package/{dialogSlice-JB5YIV5K.js → dialogSlice-DZUQZISK.js} +8 -8
- package/{docCreateCommands-2U5AIF3O.js → docCreateCommands-DTDKANXX.js} +12 -12
- package/{docDeleteCommands-EDCAUQEF.js → docDeleteCommands-U4NB6OHK.js} +13 -13
- package/{docReadCommands-KFMBFGPY.js → docReadCommands-SDVQM3BH.js} +12 -12
- package/{docStore-EXPYXKAO.js → docStore-NXDBQRDQ.js} +9 -9
- package/{docUpdateCommands-57M4XOT7.js → docUpdateCommands-O2O644FV.js} +12 -12
- package/{handleSendMessageAction-5E3MBI4X.js → handleSendMessageAction-3MMYF664.js} +8 -8
- package/index.js +46 -46
- package/{machineCommands-UPDXXKGX.js → machineCommands-QFDT6G2Q.js} +26 -26
- package/{machineWsRunDispatch-M43IR6SD.js → machineWsRunDispatch-J6IBIDYG.js} +26 -26
- package/package.json +1 -1
- package/{read-F3L3T2WJ.js → read-A23NKT3O.js} +1 -1
- package/{readDocTool-FOHWVA4R.js → readDocTool-JAM5BI5Q.js} +1 -1
- package/{readlineWorkspace-NEADCABU.js → readlineWorkspace-FU7PWLJU.js} +52 -55
- package/{removeDialogAgentAction-QCFGIUIH.js → removeDialogAgentAction-K4HOWFHO.js} +4 -4
- package/{runAgentClientLoop-NYY3IGNZ.js → runAgentClientLoop-P6J4YSE4.js} +19 -19
- package/{setDialogExtraReferencesAction-DK4CKERU.js → setDialogExtraReferencesAction-JD7J7JM4.js} +3 -3
- package/{setPrimaryDialogAgentAction-SJSO6N27.js → setPrimaryDialogAgentAction-YWSA5XEU.js} +4 -4
- package/{settingSlice-XNM5AFPU.js → settingSlice-22GTX6CA.js} +3 -3
- package/{skillDiscovery-KJWT7JBU.js → skillDiscovery-ITA7BI7A.js} +4 -2
- package/{spaceCommands-XK46FRYG.js → spaceCommands-WM6W3WMQ.js} +12 -12
- package/{spaceSlice-S6HBDF4N.js → spaceSlice-SVEWO5JX.js} +8 -8
- package/{streamAgentChatTurn-2NP4RW7O.js → streamAgentChatTurn-XJRY424B.js} +79 -35
- package/{switchDialogAgentAction-4OAC6QRN.js → switchDialogAgentAction-6JKFBJVR.js} +2 -2
- package/{tools-2HPUZOTG.js → tools-ZN6GWGYP.js} +15 -15
- package/{updateDialogTitleAction-27EH4CEC.js → updateDialogTitleAction-ZJ2HF5AQ.js} +8 -8
- package/chunk-UTYJ47H2.js +0 -51
- package/chunk-ZJ7WLPDP.js +0 -553
- package/{chunk-ATWUOTJP.js → chunk-NWT2WUCY.js} +1 -1
|
@@ -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,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
updateContentTitle
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-VEHCU5XV.js";
|
|
4
4
|
import {
|
|
5
5
|
require_date_fns
|
|
6
6
|
} from "./chunk-M76ECQRD.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
import {
|
|
14
14
|
patch,
|
|
15
15
|
readAndWait
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-JYSXE6LE.js";
|
|
17
17
|
import {
|
|
18
18
|
asOptionalTrimmedString
|
|
19
19
|
} from "./chunk-G3SUCT4W.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-W2DRG2J7.js");
|
|
371
371
|
return createPageAction(args, thunkApi);
|
|
372
372
|
}
|
|
373
373
|
function subscribe(listener) {
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
parseToolArgumentsJson,
|
|
10
10
|
resolveHistoricalToolContentCap
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-P6TB7JIA.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
|
|
@@ -33,7 +33,7 @@ import {
|
|
|
33
33
|
buildNoloWorkspaceCommandArgs,
|
|
34
34
|
noloStringArg,
|
|
35
35
|
parseNoloWorkspaceToolArguments
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-PFTK5SEB.js";
|
|
37
37
|
import {
|
|
38
38
|
buildDialogFallbackTitleFromUserInput
|
|
39
39
|
} from "./chunk-2MBTWINN.js";
|
|
@@ -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,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-VNMOLPVO.js";
|
|
11
11
|
import {
|
|
12
12
|
createDrainExhaustedResponse,
|
|
13
13
|
isCoreDrainingBody,
|
|
@@ -17,16 +17,16 @@ import {
|
|
|
17
17
|
} from "./chunk-RQSOAMPJ.js";
|
|
18
18
|
import {
|
|
19
19
|
slateToSimplifiedMarkdown
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-BOPFLKHA.js";
|
|
21
21
|
import {
|
|
22
22
|
extractCategorizedMentions
|
|
23
23
|
} from "./chunk-VP4WJWKW.js";
|
|
24
24
|
import {
|
|
25
25
|
fetchAndCacheMessages
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-VEHCU5XV.js";
|
|
27
27
|
import {
|
|
28
28
|
fetchServerSyncedCredential
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-SIZWJA7H.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
|
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
} from "./chunk-XS7UPVR7.js";
|
|
56
56
|
import {
|
|
57
57
|
estimateTokenCount
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-PMSG3OGF.js";
|
|
59
59
|
import {
|
|
60
60
|
createFileCredentialBroker
|
|
61
61
|
} from "./chunk-5CS33IBL.js";
|
|
@@ -81,10 +81,10 @@ import {
|
|
|
81
81
|
} from "./chunk-YTA2QOEE.js";
|
|
82
82
|
import {
|
|
83
83
|
createSpaceKey
|
|
84
|
-
} from "./chunk-
|
|
84
|
+
} from "./chunk-DBUNOYLF.js";
|
|
85
85
|
import {
|
|
86
86
|
read
|
|
87
|
-
} from "./chunk-
|
|
87
|
+
} from "./chunk-JYSXE6LE.js";
|
|
88
88
|
import {
|
|
89
89
|
asTrimmedLowercaseString
|
|
90
90
|
} from "./chunk-QSJ3HFEF.js";
|
|
@@ -199,7 +199,7 @@ async function readDocFunc(args, thunkApi) {
|
|
|
199
199
|
throw new Error(`\u65E0\u6548\u7684\u9875\u9762 ID: ${id}\u3002\u9875\u9762 ID \u901A\u5E38\u4EE5 "page-" \u5F00\u5934\u3002`);
|
|
200
200
|
}
|
|
201
201
|
try {
|
|
202
|
-
const { readAction } = await import("./read-
|
|
202
|
+
const { readAction } = await import("./read-A23NKT3O.js");
|
|
203
203
|
const pageData = await readAction({ dbKey: id }, thunkApi);
|
|
204
204
|
if (!pageData) {
|
|
205
205
|
throw new Error(`\u672A\u627E\u5230 ID \u4E3A ${id} \u7684\u9875\u9762\u3002`);
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
toTimestampMs,
|
|
14
14
|
upsert,
|
|
15
15
|
write
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-JYSXE6LE.js";
|
|
17
17
|
import {
|
|
18
18
|
createUserKey,
|
|
19
19
|
createUserPreferenceKey,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
} from "./chunk-QSJ3HFEF.js";
|
|
25
25
|
import {
|
|
26
26
|
BUILTIN_NOLO_AGENT_KEY
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-NWT2WUCY.js";
|
|
28
28
|
import {
|
|
29
29
|
asyncThunkCreator,
|
|
30
30
|
buildCreateSlice,
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
readAction,
|
|
13
13
|
readRequestManager,
|
|
14
14
|
resolveAgentReadServers
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-NWT2WUCY.js";
|
|
16
16
|
import {
|
|
17
17
|
asyncThunkCreator,
|
|
18
18
|
buildCreateSlice,
|
|
@@ -704,7 +704,7 @@ var dbSlice = createSliceWithThunks({
|
|
|
704
704
|
// 动态 import 在调用期解析,避开 TDZ/求值顺序问题(同下方 share)。
|
|
705
705
|
read: create.asyncThunk(
|
|
706
706
|
async (payload, thunkApi) => {
|
|
707
|
-
const { readAction: readAction2 } = await import("./read-
|
|
707
|
+
const { readAction: readAction2 } = await import("./read-A23NKT3O.js");
|
|
708
708
|
return readAction2(payload, thunkApi);
|
|
709
709
|
},
|
|
710
710
|
{
|
|
@@ -778,7 +778,7 @@ var dbSlice = createSliceWithThunks({
|
|
|
778
778
|
// 这里改成动态 import,运行期才解析,彻底断开这条边。
|
|
779
779
|
share: create.asyncThunk(
|
|
780
780
|
async (config, thunkApi) => {
|
|
781
|
-
const { shareResourceAction } = await import("./action-
|
|
781
|
+
const { shareResourceAction } = await import("./action-6BM26ZYM.js");
|
|
782
782
|
return shareResourceAction(config, thunkApi);
|
|
783
783
|
}
|
|
784
784
|
),
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
|
+
anthropicRefresh,
|
|
2
3
|
cursorRefresh,
|
|
3
4
|
refreshAntigravityOAuthToken,
|
|
4
5
|
refreshOpenAiCodexToken,
|
|
5
|
-
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
xaiRefresh
|
|
7
|
+
} from "./chunk-WX3ZOSTL.js";
|
|
7
8
|
import {
|
|
8
9
|
buildLocalAgentLookupKeys
|
|
9
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-STOUEEBU.js";
|
|
10
11
|
import {
|
|
11
12
|
LOCAL_CODEX_AGENT_ID,
|
|
12
13
|
LOCAL_CODEX_AGENT_KEY,
|
|
@@ -15,17 +16,17 @@ import {
|
|
|
15
16
|
} from "./chunk-VHBWHNVT.js";
|
|
16
17
|
import {
|
|
17
18
|
inferCaptureIntent
|
|
18
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-3LJ4RSSF.js";
|
|
19
20
|
import {
|
|
20
21
|
inlineImageUrlsForCustomProvider,
|
|
21
22
|
prepareTools
|
|
22
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-BYHN2CP5.js";
|
|
23
24
|
import {
|
|
24
25
|
getAntigravityUserAgent,
|
|
25
26
|
isAntigravityOAuthAgent,
|
|
26
27
|
readAntigravityProjectId,
|
|
27
28
|
resolveAntigravityCloudCodeBaseUrl
|
|
28
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-2FX23RGA.js";
|
|
29
30
|
import {
|
|
30
31
|
readXPostFunc,
|
|
31
32
|
readXPostFunctionSchema,
|
|
@@ -34,7 +35,7 @@ import {
|
|
|
34
35
|
rememberMemoryFunctionSchema,
|
|
35
36
|
resolveAgentRequiredPackIds,
|
|
36
37
|
setTodoListFunc
|
|
37
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-VNMOLPVO.js";
|
|
38
39
|
import {
|
|
39
40
|
createDrainExhaustedResponse,
|
|
40
41
|
isCoreDrainingBody,
|
|
@@ -47,15 +48,14 @@ import {
|
|
|
47
48
|
import {
|
|
48
49
|
applyTokenUsageToDayStats,
|
|
49
50
|
prepareTokenUsageData,
|
|
50
|
-
resolveBuiltinPlatformAgentConfig,
|
|
51
51
|
runKeyed
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-VEHCU5XV.js";
|
|
53
53
|
import {
|
|
54
54
|
BUILTIN_TITLE_LLM_CONFIG
|
|
55
55
|
} from "./chunk-XOIF2TNF.js";
|
|
56
56
|
import {
|
|
57
57
|
fetchServerSyncedCredential
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-SIZWJA7H.js";
|
|
59
59
|
import {
|
|
60
60
|
require_date_fns
|
|
61
61
|
} from "./chunk-M76ECQRD.js";
|
|
@@ -89,7 +89,7 @@ import {
|
|
|
89
89
|
readOpenAiCompatibleSseCompletion,
|
|
90
90
|
resolveAgentNextAvailableAt,
|
|
91
91
|
resolveOpenAiCompatibleProviderConfig
|
|
92
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-33K2M3AU.js";
|
|
93
93
|
import {
|
|
94
94
|
buildPlatformChatCompletionRequest,
|
|
95
95
|
canUsePlatformChatProvider,
|
|
@@ -106,7 +106,7 @@ import {
|
|
|
106
106
|
import {
|
|
107
107
|
resolveHistoricalToolContentCap,
|
|
108
108
|
summarizeToolArguments
|
|
109
|
-
} from "./chunk-
|
|
109
|
+
} from "./chunk-P6TB7JIA.js";
|
|
110
110
|
import {
|
|
111
111
|
convertMessagesToResponsesInput,
|
|
112
112
|
toResponsesTools
|
|
@@ -118,11 +118,14 @@ import {
|
|
|
118
118
|
buildNoloWorkspaceOpenAiTools,
|
|
119
119
|
parseNoloWorkspaceToolArguments,
|
|
120
120
|
resolveRuntimeToolSurfaceForAgent
|
|
121
|
-
} from "./chunk-
|
|
121
|
+
} from "./chunk-PFTK5SEB.js";
|
|
122
122
|
import {
|
|
123
123
|
buildDialogFallbackTitleFromUserInput,
|
|
124
124
|
normalizeDialogTitle
|
|
125
125
|
} from "./chunk-2MBTWINN.js";
|
|
126
|
+
import {
|
|
127
|
+
resolveBuiltinPlatformAgentConfig
|
|
128
|
+
} from "./chunk-PMSG3OGF.js";
|
|
126
129
|
import {
|
|
127
130
|
clipCompactText
|
|
128
131
|
} from "./chunk-5MMAK75Q.js";
|
|
@@ -191,9 +194,6 @@ import {
|
|
|
191
194
|
createUserKey,
|
|
192
195
|
dialogMessageRange
|
|
193
196
|
} from "./chunk-NRY4GCKJ.js";
|
|
194
|
-
import {
|
|
195
|
-
asOptionalFiniteNumber
|
|
196
|
-
} from "./chunk-WWC7I6TA.js";
|
|
197
197
|
import {
|
|
198
198
|
asTrimmedNonEmptyStringArray
|
|
199
199
|
} from "./chunk-I42VC5KR.js";
|
|
@@ -202,7 +202,7 @@ import {
|
|
|
202
202
|
} from "./chunk-QSJ3HFEF.js";
|
|
203
203
|
import {
|
|
204
204
|
isSystemBuiltinTrustedAgentKey
|
|
205
|
-
} from "./chunk-
|
|
205
|
+
} from "./chunk-NWT2WUCY.js";
|
|
206
206
|
import {
|
|
207
207
|
isRecord
|
|
208
208
|
} from "./chunk-KUG52IAP.js";
|
|
@@ -10107,57 +10107,6 @@ function isCodexOAuthAgent(agentConfig) {
|
|
|
10107
10107
|
return apiKeyRef === "chatgpt";
|
|
10108
10108
|
}
|
|
10109
10109
|
|
|
10110
|
-
// packages/agent-runtime/oauthProviders.ts
|
|
10111
|
-
var XAI_ACCESS_TOKEN_CLIENT_SKEW_MS = 5 * 60 * 1e3;
|
|
10112
|
-
var decodeBase64 = (s) => Buffer.from(s, "base64").toString("utf8");
|
|
10113
|
-
var ANTIGRAVITY_CLIENT_ID = decodeBase64(
|
|
10114
|
-
"MTA3MTAwNjA2MDU5MS10bWhzc2luMmgyMWxjcmUyMzV2dG9sb2poNGc0MDNlcC5hcHBzLmdvb2dsZXVzZXJjb250ZW50LmNvbQ=="
|
|
10115
|
-
);
|
|
10116
|
-
var ANTIGRAVITY_CLIENT_SECRET = decodeBase64("R09DU1BYLUs1OEZXUjQ4NkxkTEoxbUxCOHNYQzR6NnFEQWY=");
|
|
10117
|
-
var ANTIGRAVITY_ACCESS_TOKEN_CLIENT_SKEW_MS = 5 * 60 * 1e3;
|
|
10118
|
-
var ANTHROPIC_OAUTH_CLIENT_ID = "9d1c250a-e61b-44d9-88ed-5944d1962f5e";
|
|
10119
|
-
var ANTHROPIC_OAUTH_TOKEN_URL = "https://api.anthropic.com/v1/oauth/token";
|
|
10120
|
-
var ANTHROPIC_ACCESS_TOKEN_CLIENT_SKEW_MS = 5 * 60 * 1e3;
|
|
10121
|
-
var anthropicRefresh = async (credential, deps = {}) => {
|
|
10122
|
-
if (!credential.refreshToken) {
|
|
10123
|
-
throw new Error("Claude credential has no refresh_token");
|
|
10124
|
-
}
|
|
10125
|
-
const fetchImpl = deps.fetchImpl ?? fetch;
|
|
10126
|
-
const response = await fetchImpl(ANTHROPIC_OAUTH_TOKEN_URL, {
|
|
10127
|
-
method: "POST",
|
|
10128
|
-
headers: {
|
|
10129
|
-
"Content-Type": "application/json",
|
|
10130
|
-
"anthropic-beta": "oauth-2025-04-20",
|
|
10131
|
-
"User-Agent": "nolo-cli userOAuthProvider"
|
|
10132
|
-
},
|
|
10133
|
-
body: JSON.stringify({
|
|
10134
|
-
grant_type: "refresh_token",
|
|
10135
|
-
client_id: ANTHROPIC_OAUTH_CLIENT_ID,
|
|
10136
|
-
refresh_token: credential.refreshToken
|
|
10137
|
-
}),
|
|
10138
|
-
signal: AbortSignal.timeout(3e4)
|
|
10139
|
-
});
|
|
10140
|
-
const payload = await response.json().catch(() => ({}));
|
|
10141
|
-
if (!response.ok) {
|
|
10142
|
-
const detail = typeof payload.error_description === "string" ? payload.error_description : typeof payload.error === "string" ? payload.error : `HTTP ${response.status}`;
|
|
10143
|
-
throw new Error(`Claude token refresh failed: ${detail}`);
|
|
10144
|
-
}
|
|
10145
|
-
if (typeof payload.access_token !== "string" || !payload.access_token) {
|
|
10146
|
-
throw new Error("Claude token refresh response missing access_token");
|
|
10147
|
-
}
|
|
10148
|
-
const expiresIn = asOptionalFiniteNumber(payload.expires_in);
|
|
10149
|
-
const now = deps.now?.() ?? Date.now();
|
|
10150
|
-
return {
|
|
10151
|
-
...credential,
|
|
10152
|
-
provider: "claude",
|
|
10153
|
-
accessToken: payload.access_token,
|
|
10154
|
-
refreshToken: typeof payload.refresh_token === "string" && payload.refresh_token ? payload.refresh_token : credential.refreshToken,
|
|
10155
|
-
...expiresIn !== void 0 ? { expiresAt: now + expiresIn * 1e3 - ANTHROPIC_ACCESS_TOKEN_CLIENT_SKEW_MS } : {},
|
|
10156
|
-
scope: typeof payload.scope === "string" ? payload.scope : credential.scope,
|
|
10157
|
-
obtainedAt: now
|
|
10158
|
-
};
|
|
10159
|
-
};
|
|
10160
|
-
|
|
10161
10110
|
// packages/cli/oauth/apiKeyRefResolver.ts
|
|
10162
10111
|
var REFRESH_BY_PROVIDER = {
|
|
10163
10112
|
chatgpt: refreshOpenAiCodexToken,
|
|
@@ -10165,7 +10114,7 @@ var REFRESH_BY_PROVIDER = {
|
|
|
10165
10114
|
// surfaced as "OAuth credential not found" even when ~/.nolo/credentials
|
|
10166
10115
|
// still held a valid refresh_token.
|
|
10167
10116
|
antigravity: refreshAntigravityOAuthToken,
|
|
10168
|
-
xai:
|
|
10117
|
+
xai: xaiRefresh,
|
|
10169
10118
|
claude: anthropicRefresh,
|
|
10170
10119
|
cursor: cursorRefresh
|
|
10171
10120
|
};
|
|
@@ -11230,6 +11179,11 @@ function createCliLocalRuntimeAdapter(deps) {
|
|
|
11230
11179
|
model: agentConfig.model || "gemini-3.1-pro",
|
|
11231
11180
|
provider: agentConfig.provider || "google-antigravity",
|
|
11232
11181
|
...tool_calls ? { tool_calls } : {},
|
|
11182
|
+
// fetchAntigravityCloudCodeCompletion 已把 CCA 流聚合完毕并归一化成
|
|
11183
|
+
// OpenAI chat.completions 形状:choices[0] + usage
|
|
11184
|
+
// (prompt_tokens/completion_tokens/total_tokens)。必须透传,否则
|
|
11185
|
+
// localLoop 的 lastUsage 无 token 数,TUI context chip 拿不到更新。
|
|
11186
|
+
usage: result.body?.usage,
|
|
11233
11187
|
trace: messages
|
|
11234
11188
|
};
|
|
11235
11189
|
}
|
|
@@ -11298,6 +11252,11 @@ function createCliLocalRuntimeAdapter(deps) {
|
|
|
11298
11252
|
model: agentConfig.model || "claude-sonnet-5",
|
|
11299
11253
|
provider: "anthropic",
|
|
11300
11254
|
...tool_calls ? { tool_calls } : {},
|
|
11255
|
+
// fetchAnthropicMessagesCompletion 已把 Anthropic Messages 响应归一化成
|
|
11256
|
+
// OpenAI chat.completions 形状:choices[0] + usage(prompt_tokens/
|
|
11257
|
+
// output_tokens/cache_*)。必须透传,否则 localLoop 的 lastUsage 无
|
|
11258
|
+
// token 数,TUI context chip 拿不到更新(与 Codex OAuth 分支同因)。
|
|
11259
|
+
usage: result.body?.usage,
|
|
11301
11260
|
trace: messages
|
|
11302
11261
|
};
|
|
11303
11262
|
}
|