@nexrall/code-core 1.4.62 → 1.4.63
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/dist/agent/loop.d.ts.map +1 -1
- package/dist/agent/loop.js +10 -11
- package/dist/agent/peerTransport.d.ts.map +1 -1
- package/dist/agent/peerTransport.js +19 -12
- package/dist/api/client.d.ts +24 -0
- package/dist/api/client.d.ts.map +1 -1
- package/dist/api/client.js +45 -2
- package/dist/auth/index.d.ts +26 -18
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +45 -44
- package/dist/tools/executor.d.ts.map +1 -1
- package/dist/tools/executor.js +8 -4
- package/dist/types.d.ts +0 -16
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/agent/loop.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"loop.d.ts","sourceRoot":"","sources":["../../src/agent/loop.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EAKP,UAAU,EACV,gBAAgB,EAChB,UAAU,EACX,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"loop.d.ts","sourceRoot":"","sources":["../../src/agent/loop.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EAKP,UAAU,EACV,gBAAgB,EAChB,UAAU,EACX,MAAM,UAAU,CAAC;AAIlB,OAAO,EAA8D,KAAK,SAAS,EAAE,KAAK,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAMjI,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAwM7B,yFAAyF;AACzF,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,oBAAoB,CAClC,UAAU,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EACrC,aAAa,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
|
74
74
|
const types_1 = require("../types");
|
|
75
75
|
const client_1 = require("../api/client");
|
|
76
|
-
const index_1 = require("../auth/index");
|
|
77
76
|
const executor_1 = require("../tools/executor");
|
|
78
77
|
const agentTypes_1 = require("./agentTypes");
|
|
79
78
|
const skills_1 = require("./skills");
|
|
@@ -87,7 +86,7 @@ const planMode_1 = require("./planMode");
|
|
|
87
86
|
const worktreeEnforcement_1 = require("./worktreeEnforcement");
|
|
88
87
|
const agentRegistry_1 = require("./agentRegistry");
|
|
89
88
|
const sandbox_1 = require("../tools/sandbox");
|
|
90
|
-
const
|
|
89
|
+
const index_1 = require("../plugins/index");
|
|
91
90
|
const testIntegrity_1 = require("./testIntegrity");
|
|
92
91
|
const flaky_1 = require("./flaky");
|
|
93
92
|
const claimEvidence_1 = require("./claimEvidence");
|
|
@@ -108,7 +107,7 @@ function loadHooks(workDir) {
|
|
|
108
107
|
}
|
|
109
108
|
catch { /* ignore */ }
|
|
110
109
|
// Merge plugin-provided hooks AFTER the project's own (project hooks run first).
|
|
111
|
-
const fromPlugins = (0,
|
|
110
|
+
const fromPlugins = (0, index_1.pluginHooks)(workDir);
|
|
112
111
|
const merged = { ...fromSettings };
|
|
113
112
|
for (const phase of Object.keys(fromPlugins)) {
|
|
114
113
|
const extra = fromPlugins[phase];
|
|
@@ -3059,15 +3058,15 @@ async function runAgentLoop(initialMessages, options) {
|
|
|
3059
3058
|
stopReason = options.onBalanceStatus ? 'reported-elsewhere' : 'no-balance';
|
|
3060
3059
|
break;
|
|
3061
3060
|
}
|
|
3062
|
-
// A 403 naming a TEAM problem means the
|
|
3063
|
-
// the member was removed, the team was suspended
|
|
3064
|
-
//
|
|
3065
|
-
//
|
|
3066
|
-
//
|
|
3067
|
-
//
|
|
3068
|
-
// is
|
|
3061
|
+
// A 403 naming a TEAM problem means the team that was set to pay cannot —
|
|
3062
|
+
// the member was removed, or the team was suspended. The SAVED choice is
|
|
3063
|
+
// cleaned up by the server (services/teams.js resolveBillingTarget clears
|
|
3064
|
+
// a permanently-unusable preference itself — migration 140), so there is
|
|
3065
|
+
// nothing to clear on this side any more; what remains is telling the
|
|
3066
|
+
// user, because a silent downgrade to their own wallet after they chose a
|
|
3067
|
+
// company is the trust bug docs/TEAMS_ENTERPRISE_BUDGETS_2026-09.md §D4
|
|
3068
|
+
// warns about.
|
|
3069
3069
|
if (status === 403 && typeof code === 'string' && TEAM_SCOPE_ERROR_CODES.has(code)) {
|
|
3070
|
-
(0, index_1.setBillingTeamId)(null);
|
|
3071
3070
|
stopReason = 'team-unavailable';
|
|
3072
3071
|
break;
|
|
3073
3072
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"peerTransport.d.ts","sourceRoot":"","sources":["../../src/agent/peerTransport.ts"],"names":[],"mappings":"AAiDA,MAAM,WAAW,WAAW;IAC1B,uFAAuF;IACvF,IAAI,EAAE,MAAM,CAAC;IACb,iGAAiG;IACjG,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;
|
|
1
|
+
{"version":3,"file":"peerTransport.d.ts","sourceRoot":"","sources":["../../src/agent/peerTransport.ts"],"names":[],"mappings":"AAiDA,MAAM,WAAW,WAAW;IAC1B,uFAAuF;IACvF,IAAI,EAAE,MAAM,CAAC;IACb,iGAAiG;IACjG,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;CAChB;AA+CD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAKpD;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,iBAAS,kBAAkB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAmB7D;AAED,MAAM,WAAW,gBAAgB;IAC/B,0FAA0F;IAC1F,SAAS,EAAE,CAAC,GAAG,EAAE,WAAW,KAAK,IAAI,CAAC;IACtC;;;;;;;;;;OAUG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,EAAE,KAAK,KAAK,IAAI,CAAC;CAChC;AAED,MAAM,WAAW,SAAS;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,IAAI,IAAI,CAAC;CACf;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,gBAAgB,GAAG,SAAS,CA8EhF;AAED,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,gBAAgB,EAAE,MAAM,EACxB,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,GACnC,OAAO,CAAC,qBAAqB,CAAC,CAkChC;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,OAAO,CAAC;IACZ,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,oBAAoB,CACxC,OAAO,EAAE,eAAe,EAAE,EAC1B,OAAO,EAAE,IAAI,CAAC,WAAW,EAAE,QAAQ,CAAC,GACnC,OAAO,CAAC,eAAe,EAAE,CAAC,CAQ5B;AAED,eAAO,MAAM,sBAAsB;;;;;CAA2E,CAAC"}
|
|
@@ -90,18 +90,25 @@ const CONNECT_TIMEOUT_MS = 3000;
|
|
|
90
90
|
const isWindows = process.platform === 'win32';
|
|
91
91
|
// `struct sockaddr_un`'s `sun_path` field — what a Unix domain socket path
|
|
92
92
|
// actually gets copied into at the OS level — is a FIXED-SIZE buffer: 104
|
|
93
|
-
// bytes on macOS/BSD, 108 on Linux.
|
|
94
|
-
//
|
|
95
|
-
//
|
|
96
|
-
//
|
|
97
|
-
//
|
|
98
|
-
//
|
|
99
|
-
//
|
|
100
|
-
//
|
|
101
|
-
//
|
|
102
|
-
//
|
|
103
|
-
//
|
|
104
|
-
//
|
|
93
|
+
// bytes on macOS/BSD, 108 on Linux. Exceed it and the kernel cannot represent
|
|
94
|
+
// the path — but what you OBSERVE is platform-specific (both measured on the
|
|
95
|
+
// real thing, 2026-09-28):
|
|
96
|
+
// • macOS: `listen()` fails with EINVAL, reported to Node only through the
|
|
97
|
+
// server's `'error'` event — which this module's `startPeerInbox` used to
|
|
98
|
+
// swallow (`server.on('error', () => {/* best-effort */})`), so the peer
|
|
99
|
+
// looked successfully registered (a socketPath string was returned) while
|
|
100
|
+
// never being able to receive a single message;
|
|
101
|
+
// • Linux (node 22 / libuv): the path is silently TRUNCATED at the buffer
|
|
102
|
+
// limit and `listen()` reports success, creating the socket file somewhere
|
|
103
|
+
// else — the same "registered but unreachable" outcome, with no error
|
|
104
|
+
// event to swallow at all.
|
|
105
|
+
// Either way the peer is silently useless and this constant is the fix, which
|
|
106
|
+
// is why the fallback is keyed on the LENGTH of the path we would use rather
|
|
107
|
+
// than on any error we might or might not see. A deep home directory
|
|
108
|
+
// (`~/.nexrall/peers/<16-hex-char-id>.sock`) is enough to exceed this in
|
|
109
|
+
// practice, not just in a test harness using a long os.tmpdir() path — so this
|
|
110
|
+
// is a real production risk, not merely a test artifact. Kept conservatively
|
|
111
|
+
// below the tighter of the two OS limits.
|
|
105
112
|
const MAX_SOCKET_PATH_LENGTH = 100;
|
|
106
113
|
function preferredSocketDir() {
|
|
107
114
|
return process.env.NEXRALL_PEERS_DIR || path.join(os.homedir(), '.nexrall', 'peers');
|
package/dist/api/client.d.ts
CHANGED
|
@@ -131,6 +131,28 @@ export interface DescribeAttachmentResult {
|
|
|
131
131
|
}
|
|
132
132
|
export declare function describeAttachment(kind: 'image' | 'pdf', data: string, mediaType?: string, name?: string): Promise<DescribeAttachmentResult>;
|
|
133
133
|
export declare function getBalance(): Promise<number>;
|
|
134
|
+
/**
|
|
135
|
+
* The `teamId` field for a request body — present ONLY when this run has an
|
|
136
|
+
* explicit override (nexrall auth getBillingTeamOverride).
|
|
137
|
+
*
|
|
138
|
+
* Omitting the field is what makes the server resolve the ACCOUNT's saved
|
|
139
|
+
* choice, which is the whole point of v1.1: the web app sets "bill to Acme"
|
|
140
|
+
* once and this extension obeys it without any local state to keep in sync.
|
|
141
|
+
* Sending `teamId: null` would mean the opposite — an explicit "personal" that
|
|
142
|
+
* would override the user's own account setting on every turn.
|
|
143
|
+
*/
|
|
144
|
+
export declare function billingOverrideFields(): {
|
|
145
|
+
teamId?: number | null;
|
|
146
|
+
};
|
|
147
|
+
/**
|
|
148
|
+
* Save the account's billing target. `null` clears it (personal wallet).
|
|
149
|
+
*
|
|
150
|
+
* Server-side since v1.1, so the web app and every CLI/extension share ONE
|
|
151
|
+
* answer; the server validates membership and rejects a team the caller cannot
|
|
152
|
+
* actually use, rather than storing a preference the money path would have to
|
|
153
|
+
* clean up on the next request.
|
|
154
|
+
*/
|
|
155
|
+
export declare function setBillingTarget(teamId: number | null): Promise<void>;
|
|
134
156
|
/**
|
|
135
157
|
* One team the caller belongs to, as the server's role-aware DTO
|
|
136
158
|
* (services/teams.js teamViewToDto). The pool fields are present only for
|
|
@@ -161,6 +183,8 @@ export interface OrgsResult {
|
|
|
161
183
|
balance: number;
|
|
162
184
|
};
|
|
163
185
|
teams: OrgTeam[];
|
|
186
|
+
/** The ACCOUNT's saved choice (migration 140) — null/absent means personal. */
|
|
187
|
+
billingTargetTeamId?: number | null;
|
|
164
188
|
}
|
|
165
189
|
/**
|
|
166
190
|
* Personal balance + every team the caller belongs to, in one call.
|
package/dist/api/client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/api/client.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ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AE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;;;GAIG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC,WAAW,CAAC,CAqB3D"}
|
package/dist/api/client.js
CHANGED
|
@@ -10,6 +10,8 @@ exports.cancelTurn = cancelTurn;
|
|
|
10
10
|
exports.revokeRefreshToken = revokeRefreshToken;
|
|
11
11
|
exports.describeAttachment = describeAttachment;
|
|
12
12
|
exports.getBalance = getBalance;
|
|
13
|
+
exports.billingOverrideFields = billingOverrideFields;
|
|
14
|
+
exports.setBillingTarget = setBillingTarget;
|
|
13
15
|
exports.getOrgs = getOrgs;
|
|
14
16
|
exports.getCodeModels = getCodeModels;
|
|
15
17
|
exports.getUsageDaily = getUsageDaily;
|
|
@@ -464,7 +466,7 @@ async function streamChat(messages, options, onEvent) {
|
|
|
464
466
|
{
|
|
465
467
|
method: 'POST',
|
|
466
468
|
headers: authHeaders(),
|
|
467
|
-
body: JSON.stringify({ messages, model, env, editorContext, nexrallMd, mode, effort, clientType, extraTools, agents, skills, turnId, canWriteSharedMemory, hasOwnAgentStore, canSpawnSubAgents, canBrowseWeb,
|
|
469
|
+
body: JSON.stringify({ messages, model, env, editorContext, nexrallMd, mode, effort, clientType, extraTools, agents, skills, turnId, canWriteSharedMemory, hasOwnAgentStore, canSpawnSubAgents, canBrowseWeb, ...billingOverrideFields() }),
|
|
468
470
|
signal,
|
|
469
471
|
},
|
|
470
472
|
];
|
|
@@ -1633,7 +1635,7 @@ async function describeAttachment(kind, data, mediaType, name) {
|
|
|
1633
1635
|
const fetchOnce = () => (0, node_fetch_1.default)(`${exports.API_BASE}/api/code/assets/describe`, {
|
|
1634
1636
|
method: 'POST',
|
|
1635
1637
|
headers: { ...authHeaders(), 'Content-Type': 'application/json' },
|
|
1636
|
-
body: JSON.stringify({ kind, data, media_type: mediaType, name,
|
|
1638
|
+
body: JSON.stringify({ kind, data, media_type: mediaType, name, ...billingOverrideFields() }),
|
|
1637
1639
|
});
|
|
1638
1640
|
let response = await fetchOnce();
|
|
1639
1641
|
// Same silent-refresh pattern as every other authenticated call here — an
|
|
@@ -1687,6 +1689,46 @@ async function getBalance() {
|
|
|
1687
1689
|
const data = (await response.json());
|
|
1688
1690
|
return typeof data.balance === 'number' ? data.balance : 0;
|
|
1689
1691
|
}
|
|
1692
|
+
// ─── Billing target ("Bill to", migrations 139 + 140) ────────────────────────
|
|
1693
|
+
/**
|
|
1694
|
+
* The `teamId` field for a request body — present ONLY when this run has an
|
|
1695
|
+
* explicit override (nexrall auth getBillingTeamOverride).
|
|
1696
|
+
*
|
|
1697
|
+
* Omitting the field is what makes the server resolve the ACCOUNT's saved
|
|
1698
|
+
* choice, which is the whole point of v1.1: the web app sets "bill to Acme"
|
|
1699
|
+
* once and this extension obeys it without any local state to keep in sync.
|
|
1700
|
+
* Sending `teamId: null` would mean the opposite — an explicit "personal" that
|
|
1701
|
+
* would override the user's own account setting on every turn.
|
|
1702
|
+
*/
|
|
1703
|
+
function billingOverrideFields() {
|
|
1704
|
+
const override = (0, index_1.getBillingTeamOverride)();
|
|
1705
|
+
return override === undefined ? {} : { teamId: override };
|
|
1706
|
+
}
|
|
1707
|
+
/**
|
|
1708
|
+
* Save the account's billing target. `null` clears it (personal wallet).
|
|
1709
|
+
*
|
|
1710
|
+
* Server-side since v1.1, so the web app and every CLI/extension share ONE
|
|
1711
|
+
* answer; the server validates membership and rejects a team the caller cannot
|
|
1712
|
+
* actually use, rather than storing a preference the money path would have to
|
|
1713
|
+
* clean up on the next request.
|
|
1714
|
+
*/
|
|
1715
|
+
async function setBillingTarget(teamId) {
|
|
1716
|
+
const response = await (0, node_fetch_1.default)(`${exports.API_BASE}/api/user/billing-target`, {
|
|
1717
|
+
method: 'PUT',
|
|
1718
|
+
headers: authHeaders(),
|
|
1719
|
+
body: JSON.stringify({ teamId }),
|
|
1720
|
+
});
|
|
1721
|
+
if (!response.ok) {
|
|
1722
|
+
let message = `API error ${response.status}`;
|
|
1723
|
+
try {
|
|
1724
|
+
const parsed = (await response.json());
|
|
1725
|
+
if (parsed.error)
|
|
1726
|
+
message = parsed.error;
|
|
1727
|
+
}
|
|
1728
|
+
catch { /* non-JSON body — keep the status message */ }
|
|
1729
|
+
throw new Error(message);
|
|
1730
|
+
}
|
|
1731
|
+
}
|
|
1690
1732
|
/**
|
|
1691
1733
|
* Personal balance + every team the caller belongs to, in one call.
|
|
1692
1734
|
*
|
|
@@ -1716,6 +1758,7 @@ async function getOrgs() {
|
|
|
1716
1758
|
return {
|
|
1717
1759
|
personal: { balance: typeof json.personal?.balance === 'number' ? json.personal.balance : 0 },
|
|
1718
1760
|
teams: Array.isArray(json.teams) ? json.teams : [],
|
|
1761
|
+
billingTargetTeamId: typeof json.billingTargetTeamId === 'number' ? json.billingTargetTeamId : null,
|
|
1719
1762
|
};
|
|
1720
1763
|
}
|
|
1721
1764
|
async function getCodeModels() {
|
package/dist/auth/index.d.ts
CHANGED
|
@@ -26,26 +26,34 @@ export declare function getRefreshToken(): string | null;
|
|
|
26
26
|
*/
|
|
27
27
|
export declare function updateTokens(token: string, refreshToken?: string): void;
|
|
28
28
|
/**
|
|
29
|
-
* The
|
|
30
|
-
*
|
|
29
|
+
* The per-RUN override for which budget pays, or `undefined` for "ask the
|
|
30
|
+
* account's saved choice".
|
|
31
31
|
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
32
|
+
* The choice itself lives SERVER-side in v1.1 (`users.billing_team_id`, set from
|
|
33
|
+
* Settings > Teams in the web app): one account, one answer, shared by the web
|
|
34
|
+
* app, this extension and the CLI. v1 kept a copy in `~/.nexrall/config.json`
|
|
35
|
+
* and that could not work — the web app had no way to express the same choice,
|
|
36
|
+
* so a company could fund a pool that only ever paid for one product, and two
|
|
37
|
+
* clients could disagree about who was paying.
|
|
36
38
|
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
*
|
|
39
|
+
* What remains here is only the case where a run must NOT follow the account
|
|
40
|
+
* default:
|
|
41
|
+
*
|
|
42
|
+
* NEXRALL_BILLING_TEAM=personal|null|0 → explicit personal (returns null)
|
|
43
|
+
* NEXRALL_BILLING_TEAM=<team id> → that team (returns the id)
|
|
44
|
+
* NEXRALL_TOKEN set, no NEXRALL_BILLING_TEAM
|
|
45
|
+
* → explicit personal (returns null):
|
|
46
|
+
* CI/headless has no identity of its
|
|
47
|
+
* own, and charging a company's pool
|
|
48
|
+
* from a build job that merely happens
|
|
49
|
+
* to run on someone's machine is worse
|
|
50
|
+
* than the convenience.
|
|
51
|
+
* otherwise → undefined: omit the field and let
|
|
52
|
+
* the server resolve the saved choice.
|
|
44
53
|
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* stored credentials. Any other fields already in the file are preserved.
|
|
54
|
+
* The distinction between `undefined` and `null` is the wire's, not a nicety:
|
|
55
|
+
* absent means "no opinion" and null means "explicitly personal", which is what
|
|
56
|
+
* lets an override beat a saved team without the two ever being confused.
|
|
49
57
|
*/
|
|
50
|
-
export declare function
|
|
58
|
+
export declare function getBillingTeamOverride(): number | null | undefined;
|
|
51
59
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/auth/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAiB3C,wBAAgB,QAAQ,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAGjD;AAED,wBAAgB,QAAQ,IAAI,UAAU,GAAG,IAAI,CAwB5C;AAED,wBAAgB,SAAS,IAAI,IAAI,CAQhC;AAED,wBAAgB,eAAe,IAAI,OAAO,CAGzC;AAED,wBAAgB,QAAQ,IAAI,MAAM,GAAG,IAAI,CAGxC;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,IAAI,MAAM,GAAG,IAAI,CAM/C;AAED;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAsBvE;AAID
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAiB3C,wBAAgB,QAAQ,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,CAGjD;AAED,wBAAgB,QAAQ,IAAI,UAAU,GAAG,IAAI,CAwB5C;AAED,wBAAgB,SAAS,IAAI,IAAI,CAQhC;AAED,wBAAgB,eAAe,IAAI,OAAO,CAGzC;AAED,wBAAgB,QAAQ,IAAI,MAAM,GAAG,IAAI,CAGxC;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,IAAI,MAAM,GAAG,IAAI,CAM/C;AAED;;;;;;;;;GASG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAsBvE;AAID;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,sBAAsB,IAAI,MAAM,GAAG,IAAI,GAAG,SAAS,CAiBlE"}
|
package/dist/auth/index.js
CHANGED
|
@@ -40,8 +40,7 @@ exports.isAuthenticated = isAuthenticated;
|
|
|
40
40
|
exports.getToken = getToken;
|
|
41
41
|
exports.getRefreshToken = getRefreshToken;
|
|
42
42
|
exports.updateTokens = updateTokens;
|
|
43
|
-
exports.
|
|
44
|
-
exports.setBillingTeamId = setBillingTeamId;
|
|
43
|
+
exports.getBillingTeamOverride = getBillingTeamOverride;
|
|
45
44
|
const fs = __importStar(require("fs"));
|
|
46
45
|
const path = __importStar(require("path"));
|
|
47
46
|
const os = __importStar(require("os"));
|
|
@@ -152,54 +151,56 @@ function updateTokens(token, refreshToken) {
|
|
|
152
151
|
};
|
|
153
152
|
fs.writeFileSync(CONFIG_FILE, JSON.stringify(next, null, 2), { mode: 0o600 });
|
|
154
153
|
}
|
|
155
|
-
// ─── Billing target ("Bill to",
|
|
154
|
+
// ─── Billing target ("Bill to", migrations 139 + 140) ────────────────────────
|
|
156
155
|
/**
|
|
157
|
-
* The
|
|
158
|
-
*
|
|
156
|
+
* The per-RUN override for which budget pays, or `undefined` for "ask the
|
|
157
|
+
* account's saved choice".
|
|
159
158
|
*
|
|
160
|
-
*
|
|
161
|
-
*
|
|
162
|
-
*
|
|
163
|
-
*
|
|
159
|
+
* The choice itself lives SERVER-side in v1.1 (`users.billing_team_id`, set from
|
|
160
|
+
* Settings > Teams in the web app): one account, one answer, shared by the web
|
|
161
|
+
* app, this extension and the CLI. v1 kept a copy in `~/.nexrall/config.json`
|
|
162
|
+
* and that could not work — the web app had no way to express the same choice,
|
|
163
|
+
* so a company could fund a pool that only ever paid for one product, and two
|
|
164
|
+
* clients could disagree about who was paying.
|
|
164
165
|
*
|
|
165
|
-
*
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
*
|
|
166
|
+
* What remains here is only the case where a run must NOT follow the account
|
|
167
|
+
* default:
|
|
168
|
+
*
|
|
169
|
+
* NEXRALL_BILLING_TEAM=personal|null|0 → explicit personal (returns null)
|
|
170
|
+
* NEXRALL_BILLING_TEAM=<team id> → that team (returns the id)
|
|
171
|
+
* NEXRALL_TOKEN set, no NEXRALL_BILLING_TEAM
|
|
172
|
+
* → explicit personal (returns null):
|
|
173
|
+
* CI/headless has no identity of its
|
|
174
|
+
* own, and charging a company's pool
|
|
175
|
+
* from a build job that merely happens
|
|
176
|
+
* to run on someone's machine is worse
|
|
177
|
+
* than the convenience.
|
|
178
|
+
* otherwise → undefined: omit the field and let
|
|
179
|
+
* the server resolve the saved choice.
|
|
176
180
|
*
|
|
177
|
-
*
|
|
178
|
-
*
|
|
179
|
-
*
|
|
180
|
-
* stored credentials. Any other fields already in the file are preserved.
|
|
181
|
+
* The distinction between `undefined` and `null` is the wire's, not a nicety:
|
|
182
|
+
* absent means "no opinion" and null means "explicitly personal", which is what
|
|
183
|
+
* lets an override beat a saved team without the two ever being confused.
|
|
181
184
|
*/
|
|
182
|
-
function
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
185
|
+
function getBillingTeamOverride() {
|
|
186
|
+
const raw = process.env.NEXRALL_BILLING_TEAM;
|
|
187
|
+
if (raw != null && raw !== '') {
|
|
188
|
+
const trimmed = raw.trim();
|
|
189
|
+
if (/^(personal|null|0)$/i.test(trimmed))
|
|
190
|
+
return null;
|
|
191
|
+
// Decimal digits only: `Number()` would happily read '0x10' as 16, and an
|
|
192
|
+
// env var is typed by a human — a spelling nobody means should not silently
|
|
193
|
+
// resolve to some team.
|
|
194
|
+
if (/^\d+$/.test(trimmed)) {
|
|
195
|
+
const n = Number(trimmed);
|
|
196
|
+
if (Number.isSafeInteger(n) && n > 0)
|
|
197
|
+
return n;
|
|
189
198
|
}
|
|
199
|
+
// Garbage in the env var: fall through to the token rule rather than
|
|
200
|
+
// guessing a team id out of a typo.
|
|
190
201
|
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
if (typeof teamId === 'number' && Number.isSafeInteger(teamId) && teamId > 0) {
|
|
195
|
-
next.billingTeamId = teamId;
|
|
196
|
-
}
|
|
197
|
-
else {
|
|
198
|
-
// Removed rather than set to null: an older client reading this file must
|
|
199
|
-
// see exactly what it saw before the field existed ("bill personal"), and
|
|
200
|
-
// `null` in a JSON config is a shape nothing else in this file uses.
|
|
201
|
-
delete next.billingTeamId;
|
|
202
|
-
}
|
|
203
|
-
fs.writeFileSync(CONFIG_FILE, JSON.stringify(next, null, 2), { mode: 0o600 });
|
|
202
|
+
if (process.env.NEXRALL_TOKEN)
|
|
203
|
+
return null;
|
|
204
|
+
return undefined;
|
|
204
205
|
}
|
|
205
206
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../src/tools/executor.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAyB,KAAK,aAAa,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"executor.d.ts","sourceRoot":"","sources":["../../src/tools/executor.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EAAyB,KAAK,aAAa,EAAE,MAAM,WAAW,CAAC;AAqxFtE,wBAAsB,WAAW,CAC/B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,WAAW,CAAC,EAAE;IAAE,OAAO,EAAE,OAAO,CAAA;CAAE,EAClC,OAAO,CAAC,EAAE,aAAa,EACvB,OAAO,CAAC,EAAE,MAAM,EAChB,UAAU,CAAC,EAAE,MAAM,EACnB,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,EAMlC,QAAQ,CAAC,EAAE;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACtC,OAAO,CAAC,UAAU,CAAC,CAkCrB"}
|
package/dist/tools/executor.js
CHANGED
|
@@ -43,13 +43,17 @@ const dns = __importStar(require("dns"));
|
|
|
43
43
|
const child_process_1 = require("child_process");
|
|
44
44
|
const sandbox_1 = require("./sandbox");
|
|
45
45
|
const auth_1 = require("../auth");
|
|
46
|
+
// billingOverrideFields is the ONE place the wire's teamId rule lives (absent =
|
|
47
|
+
// follow the account's saved choice, null = explicit personal) — shared with the
|
|
48
|
+
// chat path so a fixed-price call cannot drift from it.
|
|
49
|
+
const client_1 = require("../api/client");
|
|
46
50
|
const editCompleteness_1 = require("../agent/editCompleteness");
|
|
47
51
|
const securityLint_1 = require("../agent/securityLint");
|
|
48
52
|
const memory_1 = require("../agent/memory");
|
|
49
53
|
const skills_1 = require("../agent/skills");
|
|
50
54
|
const testIntegrity_1 = require("../agent/testIntegrity");
|
|
51
55
|
const crossFile_1 = require("../agent/crossFile");
|
|
52
|
-
const
|
|
56
|
+
const client_2 = require("../api/client");
|
|
53
57
|
const symbols_1 = require("./symbols");
|
|
54
58
|
const tsLangService_1 = require("./tsLangService");
|
|
55
59
|
const safeSlice_1 = require("../util/safeSlice");
|
|
@@ -2566,7 +2570,7 @@ async function generateImage(input, workDir, abortSignal) {
|
|
|
2566
2570
|
let cost;
|
|
2567
2571
|
let balance;
|
|
2568
2572
|
try {
|
|
2569
|
-
const r = await _httpsPost(`${
|
|
2573
|
+
const r = await _httpsPost(`${client_2.API_BASE}/api/code/assets/generate`, JSON.stringify({ prompt, aspect_ratio: aspectRatio, ...(0, client_1.billingOverrideFields)() }), { 'Content-Type': 'application/json', Authorization: `Bearer ${token}` }, 170000, abortSignal);
|
|
2570
2574
|
let json = {};
|
|
2571
2575
|
try {
|
|
2572
2576
|
json = JSON.parse(r.body);
|
|
@@ -2625,7 +2629,7 @@ async function stockPhoto(input, workDir, abortSignal) {
|
|
|
2625
2629
|
// 1. Search via the backend proxy (Unsplash key lives on the server).
|
|
2626
2630
|
let photos;
|
|
2627
2631
|
try {
|
|
2628
|
-
const u = new URL(`${
|
|
2632
|
+
const u = new URL(`${client_2.API_BASE}/api/code/assets/stock`);
|
|
2629
2633
|
u.searchParams.set('query', query);
|
|
2630
2634
|
u.searchParams.set('count', String(count));
|
|
2631
2635
|
if (orientation)
|
|
@@ -2701,7 +2705,7 @@ async function webSearch(input, _workDir, abortSignal) {
|
|
|
2701
2705
|
if (!token)
|
|
2702
2706
|
return { error: 'Not authenticated. Run `nexrall-code login` first.' };
|
|
2703
2707
|
try {
|
|
2704
|
-
const r = await _httpsPost(`${
|
|
2708
|
+
const r = await _httpsPost(`${client_2.API_BASE}/api/code/tools/web_search`, JSON.stringify({ query, ...(0, client_1.billingOverrideFields)() }), { 'Content-Type': 'application/json', Authorization: `Bearer ${token}` }, 30000, abortSignal);
|
|
2705
2709
|
let json = {};
|
|
2706
2710
|
try {
|
|
2707
2711
|
json = JSON.parse(r.body);
|
package/dist/types.d.ts
CHANGED
|
@@ -225,22 +225,6 @@ export interface AuthConfig {
|
|
|
225
225
|
*/
|
|
226
226
|
refreshToken?: string;
|
|
227
227
|
email?: string;
|
|
228
|
-
/**
|
|
229
|
-
* Which TEAM's budget this installation's usage is billed to (migration
|
|
230
|
-
* 139), or absent for the personal wallet.
|
|
231
|
-
*
|
|
232
|
-
* Stored in the SAME config file as the token on purpose: the CLI, the VS
|
|
233
|
-
* Code extension and the desktop app all read this one file, so "Bill to
|
|
234
|
-
* Acme" chosen in one client is the choice every client obeys — a
|
|
235
|
-
* per-client copy would silently bill two different wallets for the same
|
|
236
|
-
* person, which is the single worst failure this feature can have.
|
|
237
|
-
*
|
|
238
|
-
* ABSENT also covers two legitimate cases: a config written before this
|
|
239
|
-
* field existed, and NEXRALL_TOKEN (CI/headless — no config identity, and
|
|
240
|
-
* billing a company by accident from a build job is worse than the
|
|
241
|
-
* convenience).
|
|
242
|
-
*/
|
|
243
|
-
billingTeamId?: number;
|
|
244
228
|
}
|
|
245
229
|
export interface PermissionRequest {
|
|
246
230
|
tool: string;
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CAC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O,EAAE,EAAE,aAAa,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,OAAO;CAOzF;AAED,0EAA0E;AAC1E,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,cAAc,CAEpE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,EAAE,GAAG,IAAI,CAG7D"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nexrall/code-core",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.63",
|
|
4
4
|
"description": "Core agent loop, tools, and extension primitives for Nexrall Code — embed an AI coding agent in any Node.js application.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Nexrall <support@nexrall.com> (https://nexrall.com)",
|