@koed-labs/server 0.10.3 → 1.0.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.
Files changed (56) hide show
  1. package/README.md +3 -3
  2. package/bin/koed.js +1 -1
  3. package/package.json +2 -2
  4. package/vendor/chunk-273NMYXE.js +605 -0
  5. package/vendor/{chunk-VPC5NLZG.js → chunk-4DHYSJJT.js} +1 -1
  6. package/vendor/{chunk-HK2H3MVE.js → chunk-53ZFCDHP.js} +4 -0
  7. package/vendor/{chunk-YCDEMYY6.js → chunk-54UL4U2E.js} +261 -110
  8. package/vendor/{chunk-X6M525ZJ.js → chunk-64AST7WZ.js} +5 -5
  9. package/vendor/{chunk-JKOG52PE.js → chunk-7FSHVVTZ.js} +1 -1
  10. package/vendor/chunk-7HLNJ2BI.js +1669 -0
  11. package/vendor/chunk-ALJUSOF7.js +175 -0
  12. package/vendor/{chunk-A6WMU2GG.js → chunk-AOZ3LMTF.js} +5 -4
  13. package/vendor/{chunk-KUIWH33N.js → chunk-AVQCUFYQ.js} +1 -1
  14. package/vendor/{chunk-JJNLH5GA.js → chunk-BYN6KXNP.js} +21 -19
  15. package/vendor/{chunk-PY5LYLV7.js → chunk-DWWMBGHX.js} +26 -21
  16. package/vendor/chunk-E6YVGIEW.js +12518 -0
  17. package/vendor/{chunk-C3N4N5HR.js → chunk-EEBIYWTE.js} +26 -21
  18. package/vendor/{chunk-YOFI4PCH.js → chunk-F77ZTTNS.js} +7 -1
  19. package/vendor/{chunk-RVYJKKWA.js → chunk-F7AMEDDU.js} +5 -4
  20. package/vendor/{chunk-473OA62O.js → chunk-FSNLU46W.js} +218 -12497
  21. package/vendor/{chunk-2S3OGPUC.js → chunk-GY5GATZL.js} +2 -2
  22. package/vendor/chunk-ILQVLZ2I.js +50 -0
  23. package/vendor/{chunk-QIIKMG3M.js → chunk-IY2HRXOZ.js} +1 -5
  24. package/vendor/{chunk-ZUGNCQZE.js → chunk-JYK6UL6D.js} +22 -8
  25. package/vendor/chunk-KG3RANR4.js +75 -0
  26. package/vendor/{chunk-YJ6XUZT6.js → chunk-KRBZZ6GS.js} +23 -16
  27. package/vendor/{chunk-AFLKCQHF.js → chunk-L4RD3TAZ.js} +2 -2
  28. package/vendor/{chunk-XNFVSVBS.js → chunk-LHUMBHG7.js} +1 -1
  29. package/vendor/{chunk-J2L726BC.js → chunk-NGV45YWB.js} +3 -3
  30. package/vendor/{chunk-A4NKL2PK.js → chunk-OG7G6DIR.js} +1 -1
  31. package/vendor/{chunk-DXTAWHY3.js → chunk-OZU6JFB4.js} +8 -7
  32. package/vendor/chunk-QV3WPU7A.js +8 -0
  33. package/vendor/{chunk-ZXX4ZNJY.js → chunk-S6HD3MDU.js} +3 -2
  34. package/vendor/{chunk-NEWIOOM6.js → chunk-SQZ2OSP6.js} +3 -2
  35. package/vendor/{chunk-G4IIVVJO.js → chunk-T6UB5PNX.js} +70 -2
  36. package/vendor/{chunk-SKVYP7NY.js → chunk-T7OGE5E5.js} +8 -8
  37. package/vendor/{chunk-GELDEJJ2.js → chunk-TIBYKMRW.js} +173 -51
  38. package/vendor/{chunk-HFM6ROJL.js → chunk-TISYUUEJ.js} +1 -1
  39. package/vendor/{chunk-K2EIFEQF.js → chunk-TSAYTRX3.js} +1 -1
  40. package/vendor/{chunk-PT3AUPGE.js → chunk-UB6JCVQ3.js} +3 -1
  41. package/vendor/{chunk-NM5NXCVM.js → chunk-UCOHFZ77.js} +626 -996
  42. package/vendor/{chunk-2BWTLF7A.js → chunk-UIMUUIH7.js} +45 -21
  43. package/vendor/{chunk-HZJK5RWC.js → chunk-USHFSJT7.js} +695 -280
  44. package/vendor/chunk-VGL5AZN5.js +152 -0
  45. package/vendor/{chunk-TSRPHKAC.js → chunk-VLP72QWX.js} +16 -42
  46. package/vendor/chunk-W6632NOX.js +14 -0
  47. package/vendor/{chunk-YJWREXN6.js → chunk-WBMO7YCO.js} +1 -1
  48. package/vendor/chunk-XCO3RV3Z.js +11 -0
  49. package/vendor/chunk-XKXSC6YS.js +373 -0
  50. package/vendor/{chunk-YK4F4VY2.js → chunk-Y6GE52OP.js} +51 -30
  51. package/vendor/{chunk-UI5RLBKQ.js → chunk-YZLQZU5E.js} +17 -1
  52. package/vendor/chunk-ZKKWLLPU.js +18 -0
  53. package/vendor/cli.js +1 -1
  54. package/vendor/component-manifest-catalog.js +2 -1
  55. package/vendor/control-plane.js +11 -6
  56. package/vendor/chunk-2DA7EFZV.js +0 -924
@@ -1,6 +1,10 @@
1
1
  import { createRequire as createKoedRequire } from "node:module"; const require = createKoedRequire(import.meta.url);
2
+ import {
3
+ noteAiClientConnectionRevision
4
+ } from "./chunk-KG3RANR4.js";
2
5
  import {
3
6
  configureCodexIntegrationForRemoteBackend,
7
+ grantAiClientConnection,
4
8
  inspectClaudeCode,
5
9
  inspectCodex,
6
10
  inspectPi,
@@ -10,33 +14,41 @@ import {
10
14
  resolveClaudeExecutablePath,
11
15
  resolveCodexExecutablePath,
12
16
  resolvePiSetupExecutable,
17
+ revokeAiClientConnection,
13
18
  setupClaude,
14
19
  setupPi
15
- } from "./chunk-HZJK5RWC.js";
20
+ } from "./chunk-USHFSJT7.js";
16
21
  import "./chunk-QT24SAW6.js";
17
- import "./chunk-HFM6ROJL.js";
22
+ import "./chunk-TISYUUEJ.js";
18
23
  import {
19
24
  resolveKoedServerConfig
20
- } from "./chunk-NM5NXCVM.js";
25
+ } from "./chunk-ALJUSOF7.js";
26
+ import "./chunk-LHUMBHG7.js";
21
27
  import {
22
- isProcessRunning
23
- } from "./chunk-G4IIVVJO.js";
28
+ resolveKoedServerPaths
29
+ } from "./chunk-TSAYTRX3.js";
30
+ import "./chunk-YZLQZU5E.js";
31
+ import "./chunk-W2HNI6AA.js";
24
32
  import {
25
33
  resolveKoedAppRuntime
26
- } from "./chunk-A4NKL2PK.js";
27
- import "./chunk-QIIKMG3M.js";
28
- import "./chunk-2DA7EFZV.js";
29
- import "./chunk-VPC5NLZG.js";
30
- import "./chunk-YJWREXN6.js";
31
- import "./chunk-XNFVSVBS.js";
34
+ } from "./chunk-OG7G6DIR.js";
35
+ import "./chunk-UCOHFZ77.js";
36
+ import {
37
+ isProcessRunning
38
+ } from "./chunk-T6UB5PNX.js";
32
39
  import {
33
40
  require_proper_lockfile
34
41
  } from "./chunk-7NXKPDF3.js";
42
+ import "./chunk-XCO3RV3Z.js";
43
+ import "./chunk-7HLNJ2BI.js";
44
+ import "./chunk-VGL5AZN5.js";
45
+ import "./chunk-QV3WPU7A.js";
46
+ import "./chunk-IY2HRXOZ.js";
47
+ import "./chunk-4DHYSJJT.js";
48
+ import "./chunk-WBMO7YCO.js";
35
49
  import {
36
- resolveKoedServerPaths
37
- } from "./chunk-K2EIFEQF.js";
38
- import "./chunk-UI5RLBKQ.js";
39
- import "./chunk-W2HNI6AA.js";
50
+ isTeamMemoryAnswerTaskCapability
51
+ } from "./chunk-E6YVGIEW.js";
40
52
  import {
41
53
  NEVER,
42
54
  ZodIssueCode,
@@ -50,7 +62,6 @@ import {
50
62
  email,
51
63
  external_exports,
52
64
  intersection,
53
- isTeamMemoryAnswerTaskCapability,
54
65
  iso_exports,
55
66
  lazy,
56
67
  literal,
@@ -66,7 +77,7 @@ import {
66
77
  union,
67
78
  unknown,
68
79
  url
69
- } from "./chunk-473OA62O.js";
80
+ } from "./chunk-FSNLU46W.js";
70
81
  import {
71
82
  __toESM
72
83
  } from "./chunk-BTS4ZTF3.js";
@@ -13160,7 +13171,9 @@ var inspectHarness = async (harness, environment) => {
13160
13171
  resolveCodexExecutable: resolveCodexExecutablePath,
13161
13172
  checkPid: isProcessRunning,
13162
13173
  delay: (milliseconds) => new Promise((resolve4) => setTimeout(resolve4, milliseconds)),
13163
- now: () => /* @__PURE__ */ new Date()
13174
+ now: () => /* @__PURE__ */ new Date(),
13175
+ // Checking a harness never changes whether it is connected.
13176
+ revokeAiClientConnection: () => false
13164
13177
  };
13165
13178
  const profile = await (harness === "codex" ? inspectCodex(environment, paths, dependencies, resolveKoedServerConfig(paths, environment).codexGlobalMemoryGuidanceEnabled) : harness === "claude" ? inspectClaudeCode(environment, paths, dependencies) : inspectPi(environment, paths, dependencies));
13166
13179
  return profile.configured === true && profile.state === "healthy";
@@ -13189,6 +13202,8 @@ var setupHeadlessRemoteIntegration = async (options) => {
13189
13202
  }
13190
13203
  if (options.signal?.aborted)
13191
13204
  return result(options.harness, "cancelled");
13205
+ const koedHome = resolveKoedServerPaths(environment).koedHome;
13206
+ const revision = noteAiClientConnectionRevision(koedHome, options.harness);
13192
13207
  const childEnvironment = harnessEnvironment(environment, descriptor);
13193
13208
  const configured = await (options.setupHarness ? options.setupHarness(options.harness, childEnvironment) : options.harness === "codex" ? configureCodexIntegrationForRemoteBackend({
13194
13209
  ...options.codexOptions,
@@ -13200,6 +13215,8 @@ var setupHeadlessRemoteIntegration = async (options) => {
13200
13215
  return result(options.harness, "needs_attention", "AI Client integration setup failed; review the existing harness setup checks.");
13201
13216
  }
13202
13217
  writeHeadlessRemoteIntegration(environment, descriptor);
13218
+ if (!grantAiClientConnection(koedHome, options.harness, revision))
13219
+ return result(options.harness, "needs_attention", "The AI Client changed while setup ran; capture stays off. Set it up again to connect it.");
13203
13220
  return result(options.harness, "configured");
13204
13221
  } catch {
13205
13222
  return result(options.harness, "needs_attention", "Remote integration configuration could not be safely updated.");
@@ -13230,10 +13247,17 @@ var removeHeadlessRemoteIntegration = (options) => {
13230
13247
  if (denied)
13231
13248
  return denied;
13232
13249
  const environment = options.environment ?? process.env;
13250
+ let disconnected = true;
13251
+ try {
13252
+ revokeAiClientConnection(resolveKoedServerPaths(environment).koedHome, options.harness);
13253
+ } catch {
13254
+ disconnected = false;
13255
+ }
13256
+ const removedResult = () => disconnected ? result(options.harness, "removed") : result(options.harness, "needs_attention", "The AI Client could not be disconnected; Koed may still read its conversations.");
13233
13257
  try {
13234
13258
  const descriptor = readHeadlessRemoteIntegration(environment);
13235
13259
  if (!descriptor?.harnesses.includes(options.harness))
13236
- return result(options.harness, "removed");
13260
+ return removedResult();
13237
13261
  const childEnvironment = harnessEnvironment(environment, descriptor);
13238
13262
  const removed = options.removeHarness ? options.removeHarness(options.harness, childEnvironment) : options.harness === "codex" ? removeCodexIntegration({
13239
13263
  ...options.codexOptions,
@@ -13250,7 +13274,7 @@ var removeHeadlessRemoteIntegration = (options) => {
13250
13274
  } else {
13251
13275
  unlinkSync(headlessRemoteIntegrationPath(environment));
13252
13276
  }
13253
- return result(options.harness, "removed");
13277
+ return removedResult();
13254
13278
  } catch {
13255
13279
  return result(options.harness, "needs_attention", "Remote integration configuration could not be safely removed.");
13256
13280
  }
@@ -13866,7 +13890,7 @@ var runRemoteMcpOperation = async (command, input, options) => {
13866
13890
  }
13867
13891
  };
13868
13892
  var runRemoteMcpCommand = async (args, options) => {
13869
- const { runKoedServerCli } = await import("./chunk-X6M525ZJ.js");
13893
+ const { runKoedServerCli } = await import("./chunk-64AST7WZ.js");
13870
13894
  return runKoedServerCli(["remote", ...args], {
13871
13895
  stdout: options.stdout,
13872
13896
  stderr: options.stderr,