anyray-connect 0.11.49 → 0.11.53
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/assets/vscodeExtensionAsset.js +5 -5
- package/dist/assets/vscodeExtensionAsset.js.map +1 -1
- package/dist/cli.js +7 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/fallbackProxy.js +11 -6
- package/dist/commands/fallbackProxy.js.map +1 -1
- package/dist/commands/login.js +268 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/managed.js +6 -1
- package/dist/commands/managed.js.map +1 -1
- package/dist/commands/ssoGate.js +3 -28
- package/dist/commands/ssoGate.js.map +1 -1
- package/dist/commands/sync.js +39 -28
- package/dist/commands/sync.js.map +1 -1
- package/dist/tools/copilotChat.js +33 -7
- package/dist/tools/copilotChat.js.map +1 -1
- package/dist/tools/cursor.js +36 -7
- package/dist/tools/cursor.js.map +1 -1
- package/dist/tools/shellEnv.js +19 -0
- package/dist/tools/shellEnv.js.map +1 -1
- package/dist/util/devRefresh.js +23 -1
- package/dist/util/devRefresh.js.map +1 -1
- package/dist/util/durableRuntime.js +18 -0
- package/dist/util/durableRuntime.js.map +1 -1
- package/dist/util/fallback.js +16 -8
- package/dist/util/fallback.js.map +1 -1
- package/dist/util/jsonc.js +74 -0
- package/dist/util/jsonc.js.map +1 -0
- package/dist/util/log.js +18 -11
- package/dist/util/log.js.map +1 -1
- package/dist/util/openBrowser.js +25 -0
- package/dist/util/openBrowser.js.map +1 -0
- package/dist/util/policySync.js +156 -39
- package/dist/util/policySync.js.map +1 -1
- package/dist/util/proxyEnrollmentGate.js +30 -7
- package/dist/util/proxyEnrollmentGate.js.map +1 -1
- package/package.json +7 -4
package/dist/util/policySync.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Team
|
|
2
|
+
* Team policy sync and reconciliation (client side).
|
|
3
3
|
*
|
|
4
4
|
* `anyray-connect sync` pulls the org's shared skills/instructions from the
|
|
5
5
|
* gateway and writes them as `SKILL.md` files into each supported coding tool's
|
|
@@ -9,25 +9,66 @@
|
|
|
9
9
|
* fine and does not touch the privacy invariant.
|
|
10
10
|
*
|
|
11
11
|
* Contract (gateway-side): `GET <gatewayUrl>/connect/policy` with header
|
|
12
|
-
* `x-anyray-api-key: <personal key
|
|
13
|
-
*
|
|
12
|
+
* `x-anyray-api-key: <personal key>` returns versioned metadata/config: shared
|
|
13
|
+
* skills plus optional routing origin, bound team, and enabled tool ids. A
|
|
14
|
+
* skills-only document without `version` is the legacy v0 shape.
|
|
14
15
|
*
|
|
15
16
|
* On a non-200 or a network error we fail gracefully with a clear message
|
|
16
17
|
* (never crash). The last-synced version per skill is tracked in ~/.anyray so
|
|
17
18
|
* re-runs only rewrite files whose `version` changed.
|
|
18
19
|
*/
|
|
19
|
-
import { mkdir, writeFile } from
|
|
20
|
-
import { join } from
|
|
20
|
+
import { mkdir, writeFile } from "node:fs/promises";
|
|
21
|
+
import { join } from "node:path";
|
|
22
|
+
import { z } from "zod";
|
|
23
|
+
import { REGISTRY } from "../tools/index.js";
|
|
24
|
+
import { resolveOrigin } from "../target.js";
|
|
25
|
+
import { loadProfile, saveProfile } from "./persist.js";
|
|
26
|
+
import { targetFromProfile } from "./profileTarget.js";
|
|
27
|
+
import { findDriftedManagedTools, repairSucceeded, repairTools, } from "./repair.js";
|
|
21
28
|
const POLICY_TIMEOUT_MS = 10_000;
|
|
22
|
-
const
|
|
29
|
+
export const TEAM_POLICY_VERSION = 1;
|
|
30
|
+
const safeSkillId = z
|
|
31
|
+
.string()
|
|
32
|
+
.min(1)
|
|
33
|
+
.regex(/^[a-zA-Z0-9][a-zA-Z0-9._-]*$/)
|
|
34
|
+
.refine((id) => id !== "." && id !== "..");
|
|
35
|
+
const policySkillSchema = z.object({
|
|
36
|
+
id: safeSkillId,
|
|
37
|
+
name: z.string().min(1),
|
|
38
|
+
version: z.string().min(1),
|
|
39
|
+
/** Markdown body of the skill — team policy text, content-free. */
|
|
40
|
+
body: z.string(),
|
|
41
|
+
});
|
|
23
42
|
/**
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* it to a single safe path segment: a leading alphanumeric, then alphanumerics,
|
|
28
|
-
* `.`, `_`, `-` — which excludes `/`, `\`, `..`, and absolute paths.
|
|
43
|
+
* The consume-side policy boundary. Zod objects strip unknown keys, so future
|
|
44
|
+
* additive fields are ignored. Every v1 field is optional; the shared-skills
|
|
45
|
+
* array is the legacy core, and absence of `version` means a v0 document.
|
|
29
46
|
*/
|
|
30
|
-
const
|
|
47
|
+
export const teamPolicySchema = z.object({
|
|
48
|
+
version: z.literal(TEAM_POLICY_VERSION).optional(),
|
|
49
|
+
skills: z.array(policySkillSchema),
|
|
50
|
+
updatedAt: z.string().min(1).optional(),
|
|
51
|
+
routing: z
|
|
52
|
+
.object({
|
|
53
|
+
origin: z.string().min(1),
|
|
54
|
+
})
|
|
55
|
+
.optional(),
|
|
56
|
+
team: z.string().min(1).optional(),
|
|
57
|
+
tools: z
|
|
58
|
+
.object({
|
|
59
|
+
enabled: z.array(z.string().min(1)),
|
|
60
|
+
})
|
|
61
|
+
.optional(),
|
|
62
|
+
});
|
|
63
|
+
/** A skill id becomes a directory name, so it must be one safe path segment. */
|
|
64
|
+
const isSafeSkillId = (id) => /^[a-zA-Z0-9][a-zA-Z0-9._-]*$/.test(id) && id !== "." && id !== "..";
|
|
65
|
+
/** Safe label for parse/fetch failures; never includes response bodies. */
|
|
66
|
+
export const policyErrorName = (error) => error &&
|
|
67
|
+
typeof error === "object" &&
|
|
68
|
+
"name" in error &&
|
|
69
|
+
typeof error.name === "string"
|
|
70
|
+
? error.name
|
|
71
|
+
: "Error";
|
|
31
72
|
/**
|
|
32
73
|
* Fetch the team policy from the gateway. Throws an Error with a clear,
|
|
33
74
|
* content-free message on non-200 or network failure — callers catch it and
|
|
@@ -41,13 +82,13 @@ export const fetchTeamPolicy = async (gatewayUrl, apiKey, opts = {}) => {
|
|
|
41
82
|
let res;
|
|
42
83
|
try {
|
|
43
84
|
res = await fetch(url, {
|
|
44
|
-
method:
|
|
45
|
-
headers: {
|
|
85
|
+
method: "GET",
|
|
86
|
+
headers: { "x-anyray-api-key": apiKey },
|
|
46
87
|
signal: controller.signal,
|
|
47
88
|
});
|
|
48
89
|
}
|
|
49
90
|
catch (error) {
|
|
50
|
-
const reason = error instanceof Error && error.name ===
|
|
91
|
+
const reason = error instanceof Error && error.name === "AbortError"
|
|
51
92
|
? `no response within ${timeoutMs}ms`
|
|
52
93
|
: error instanceof Error
|
|
53
94
|
? error.message
|
|
@@ -62,30 +103,106 @@ export const fetchTeamPolicy = async (gatewayUrl, apiKey, opts = {}) => {
|
|
|
62
103
|
}
|
|
63
104
|
let body;
|
|
64
105
|
try {
|
|
65
|
-
body =
|
|
106
|
+
body = await res.json();
|
|
66
107
|
}
|
|
67
|
-
catch {
|
|
68
|
-
|
|
108
|
+
catch (error) {
|
|
109
|
+
const malformed = new Error("team policy fetch failed: the gateway returned a malformed response");
|
|
110
|
+
malformed.name = policyErrorName(error);
|
|
111
|
+
throw malformed;
|
|
69
112
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
113
|
+
return teamPolicySchema.parse(body);
|
|
114
|
+
};
|
|
115
|
+
/**
|
|
116
|
+
* Reconcile the server-owned fleet fields into the local profile and installed
|
|
117
|
+
* tools. The tool policy is strictly enable-only AND revert-safe: it only ever
|
|
118
|
+
* re-points tools already recorded in `managedTools`. An enabled id that is not
|
|
119
|
+
* managed — never enrolled, or intentionally reverted — is never applied or
|
|
120
|
+
* recorded, so a fleet policy can never resurrect a tool the developer reverted
|
|
121
|
+
* (the #1031 rule the drift path also enforces). A routing/team change re-points
|
|
122
|
+
* every managed tool; otherwise only managed tools that have drifted off the
|
|
123
|
+
* origin are re-applied, so a steady-state reconcile is a no-op.
|
|
124
|
+
*/
|
|
125
|
+
export const reconcileFleetPolicy = async (policy, deps = {}) => {
|
|
126
|
+
const load = deps.loadProfile ?? loadProfile;
|
|
127
|
+
const save = deps.saveProfile ?? saveProfile;
|
|
128
|
+
const buildTarget = deps.targetFromProfile ?? targetFromProfile;
|
|
129
|
+
const adapters = deps.adapters ?? REGISTRY;
|
|
130
|
+
const applyTools = deps.repairTools ?? repairTools;
|
|
131
|
+
const profile = await load();
|
|
132
|
+
let next = { ...profile };
|
|
133
|
+
let routingUpdated = false;
|
|
134
|
+
let teamUpdated = false;
|
|
135
|
+
if (policy.routing?.origin) {
|
|
136
|
+
const origin = resolveOrigin(policy.routing.origin);
|
|
137
|
+
if (origin !== profile.gateway) {
|
|
138
|
+
next.gateway = origin;
|
|
139
|
+
routingUpdated = true;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
if (policy.team && policy.team !== profile.team) {
|
|
143
|
+
next.team = policy.team;
|
|
144
|
+
teamUpdated = true;
|
|
145
|
+
}
|
|
146
|
+
if (routingUpdated || teamUpdated) {
|
|
147
|
+
// Merge onto the freshest credential/profile snapshot so a key refresh
|
|
148
|
+
// that completed during policy parsing is not rolled back.
|
|
149
|
+
next = { ...(await load()) };
|
|
150
|
+
if (routingUpdated)
|
|
151
|
+
next.gateway = resolveOrigin(policy.routing.origin);
|
|
152
|
+
if (teamUpdated)
|
|
153
|
+
next.team = policy.team;
|
|
154
|
+
await save(next);
|
|
155
|
+
}
|
|
156
|
+
// Only tools already recorded in `managedTools` may be touched. An enabled id
|
|
157
|
+
// absent from the record was never enrolled or was intentionally reverted, and
|
|
158
|
+
// must never be resurrected here — the same #1031 revert-stickiness guarantee
|
|
159
|
+
// the drift path enforces. Enabled ids keep their (already-managed) tool
|
|
160
|
+
// pointed; a routing/team change re-points every managed tool.
|
|
161
|
+
const enabled = new Set(policy.tools?.enabled ?? []);
|
|
162
|
+
const managedIds = next.managedTools ?? [];
|
|
163
|
+
const candidateIds = managedIds.filter((id) => enabled.has(id) || routingUpdated || teamUpdated);
|
|
164
|
+
let toolsRequested = 0;
|
|
165
|
+
let toolsApplied = 0;
|
|
166
|
+
if (candidateIds.length > 0) {
|
|
167
|
+
const resolved = await buildTarget(async () => next);
|
|
168
|
+
if (resolved) {
|
|
169
|
+
// A team-only change is invisible to `pointsAt` (same origin), so when
|
|
170
|
+
// routing or team changed we re-point every installed candidate.
|
|
171
|
+
// Otherwise re-apply only the candidates that have actually drifted off
|
|
172
|
+
// the origin, so a steady-state reconcile applies nothing (idempotent).
|
|
173
|
+
let toApply;
|
|
174
|
+
if (routingUpdated || teamUpdated) {
|
|
175
|
+
const candidate = new Set(candidateIds);
|
|
176
|
+
toApply = [];
|
|
177
|
+
for (const adapter of adapters) {
|
|
178
|
+
if (!candidate.has(adapter.id))
|
|
179
|
+
continue;
|
|
180
|
+
try {
|
|
181
|
+
if ((await adapter.detect()).installed)
|
|
182
|
+
toApply.push(adapter);
|
|
183
|
+
}
|
|
184
|
+
catch {
|
|
185
|
+
// An unreadable/uninstalled tool is not changed.
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
toApply = await findDriftedManagedTools(candidateIds, resolved.toolOrigin, adapters);
|
|
191
|
+
}
|
|
192
|
+
toolsRequested = toApply.length;
|
|
193
|
+
if (toApply.length > 0) {
|
|
194
|
+
const results = await applyTools(toApply, resolved.target);
|
|
195
|
+
toolsApplied = results.filter(repairSucceeded).length;
|
|
196
|
+
}
|
|
197
|
+
}
|
|
87
198
|
}
|
|
88
|
-
return {
|
|
199
|
+
return {
|
|
200
|
+
routingUpdated,
|
|
201
|
+
teamUpdated,
|
|
202
|
+
toolsRequested,
|
|
203
|
+
toolsApplied,
|
|
204
|
+
profileUpdated: routingUpdated || teamUpdated,
|
|
205
|
+
};
|
|
89
206
|
};
|
|
90
207
|
/**
|
|
91
208
|
* Diff the fetched policy against the previously synced versions and write
|
|
@@ -121,11 +238,11 @@ export const syncPolicyToDirs = async (policy, skillsDirs, previousVersions) =>
|
|
|
121
238
|
const files = [];
|
|
122
239
|
for (const dir of skillsDirs) {
|
|
123
240
|
const skillDir = join(dir, skill.id);
|
|
124
|
-
const file = join(skillDir,
|
|
241
|
+
const file = join(skillDir, "SKILL.md");
|
|
125
242
|
await mkdir(skillDir, { recursive: true });
|
|
126
243
|
// Skill bodies are team policy text (content-free); persisting them is
|
|
127
244
|
// intended. A trailing newline keeps the files diff-friendly.
|
|
128
|
-
await writeFile(file, ensureTrailingNewline(skill.body),
|
|
245
|
+
await writeFile(file, ensureTrailingNewline(skill.body), "utf-8");
|
|
129
246
|
files.push(file);
|
|
130
247
|
}
|
|
131
248
|
changed += 1;
|
|
@@ -139,5 +256,5 @@ export const syncPolicyToDirs = async (policy, skillsDirs, previousVersions) =>
|
|
|
139
256
|
}
|
|
140
257
|
return { results, changed, unchanged, versions, updatedAt: policy.updatedAt };
|
|
141
258
|
};
|
|
142
|
-
const ensureTrailingNewline = (body) => body.endsWith(
|
|
259
|
+
const ensureTrailingNewline = (body) => body.endsWith("\n") ? body : `${body}\n`;
|
|
143
260
|
//# sourceMappingURL=policySync.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"policySync.js","sourceRoot":"","sources":["../../src/util/policySync.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"policySync.js","sourceRoot":"","sources":["../../src/util/policySync.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM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Gate.js';
|
|
|
30
30
|
const GATE_ATTEMPT_MIN_GAP_MS = 60_000;
|
|
31
31
|
/** Re-notify the SAME pending grant at most this often. */
|
|
32
32
|
const RENOTIFY_MIN_GAP_MS = 10 * 60_000;
|
|
33
|
+
const headerValue = (headers, name) => {
|
|
34
|
+
const raw = headers[name];
|
|
35
|
+
return typeof raw === 'string' ? raw : Array.isArray(raw) ? raw[0] : undefined;
|
|
36
|
+
};
|
|
33
37
|
/**
|
|
34
38
|
* Mirror of the gateway's token-source order (`tokenFrom` in
|
|
35
39
|
* clientKeyAuth): x-anyray-api-key, an Authorization Bearer, or an `ark_`
|
|
@@ -38,16 +42,35 @@ const RENOTIFY_MIN_GAP_MS = 10 * 60_000;
|
|
|
38
42
|
* and firing on someone else's presented credential would be noise.
|
|
39
43
|
*/
|
|
40
44
|
export const inboundPresentsToken = (headers) => {
|
|
41
|
-
|
|
42
|
-
const raw = headers[name];
|
|
43
|
-
return typeof raw === 'string' ? raw : Array.isArray(raw) ? raw[0] : undefined;
|
|
44
|
-
};
|
|
45
|
-
if (value('x-anyray-api-key')?.trim())
|
|
45
|
+
if (headerValue(headers, 'x-anyray-api-key')?.trim())
|
|
46
46
|
return true;
|
|
47
|
-
const auth =
|
|
47
|
+
const auth = headerValue(headers, 'authorization')?.trim() ?? '';
|
|
48
48
|
if (/^bearer\s+\S+/i.test(auth))
|
|
49
49
|
return true;
|
|
50
|
-
const xApiKey =
|
|
50
|
+
const xApiKey = headerValue(headers, 'x-api-key')?.trim() ?? '';
|
|
51
|
+
return xApiKey.startsWith('ark_');
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Narrower sibling of inboundPresentsToken for the key-INJECTION decision: does
|
|
55
|
+
* the request already carry a CLIENT KEY (an `ark_` gateway key)? The only
|
|
56
|
+
* difference is the Authorization Bearer: a bare bearer is a client key ONLY
|
|
57
|
+
* when it's an `ark_` token. A subscription/provider OAuth bearer (passthrough
|
|
58
|
+
* mode — the seat token the gateway forwards upstream) is NOT a client key; it
|
|
59
|
+
* lives in a different slot than the `x-anyray-api-key` the gateway reads for
|
|
60
|
+
* client-key identity. So when only a seat OAuth is present the daemon may
|
|
61
|
+
* inject the enrolled per-user key into the empty client-key slot without
|
|
62
|
+
* overriding anything the caller presented — which lets a passthrough tool pick
|
|
63
|
+
* up a freshly re-minted key mid-session with no restart. The brute-force /
|
|
64
|
+
* enrollment gate above still uses the broader inboundPresentsToken (a seat
|
|
65
|
+
* OAuth means "has a credential, don't nag to enroll").
|
|
66
|
+
*/
|
|
67
|
+
export const inboundPresentsClientKey = (headers) => {
|
|
68
|
+
if (headerValue(headers, 'x-anyray-api-key')?.trim())
|
|
69
|
+
return true;
|
|
70
|
+
const auth = headerValue(headers, 'authorization')?.trim() ?? '';
|
|
71
|
+
if (/^bearer\s+ark_\S+/i.test(auth))
|
|
72
|
+
return true;
|
|
73
|
+
const xApiKey = headerValue(headers, 'x-api-key')?.trim() ?? '';
|
|
51
74
|
return xApiKey.startsWith('ark_');
|
|
52
75
|
};
|
|
53
76
|
/** The gateway's clientKeyAuth guard surface: /v1/ paths only. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"proxyEnrollmentGate.js","sourceRoot":"","sources":["../../src/util/proxyEnrollmentGate.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AACzD,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAEpD,wEAAwE;AACxE,MAAM,uBAAuB,GAAG,MAAM,CAAC;AACvC,2DAA2D;AAC3D,MAAM,mBAAmB,GAAG,EAAE,GAAG,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"proxyEnrollmentGate.js","sourceRoot":"","sources":["../../src/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CAAC,CAAC,CAAC;YACP,CAAC;YAAC,MAAM,CAAC;gBACP,gDAAgD;YAClD,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "anyray-connect",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.53",
|
|
4
4
|
"description": "Anyray connect — points local coding tools (Claude Code, Cursor, Windsurf, SDKs) at the Anyray gateway through supported configuration and enrolled personal authentication.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -25,6 +25,9 @@
|
|
|
25
25
|
"engines": {
|
|
26
26
|
"node": ">=24"
|
|
27
27
|
},
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"zod": "4.4.3"
|
|
30
|
+
},
|
|
28
31
|
"files": [
|
|
29
32
|
"dist/",
|
|
30
33
|
"README.md"
|
|
@@ -39,8 +42,8 @@
|
|
|
39
42
|
"prepublishOnly": "npm run build && npm test"
|
|
40
43
|
},
|
|
41
44
|
"devDependencies": {
|
|
42
|
-
"@types/node": "26.1.
|
|
43
|
-
"tsx": "4.23.
|
|
44
|
-
"typescript": "
|
|
45
|
+
"@types/node": "26.1.1",
|
|
46
|
+
"tsx": "4.23.1",
|
|
47
|
+
"typescript": "7.0.2"
|
|
45
48
|
}
|
|
46
49
|
}
|