managed-deepagents 0.5.0-dev.90 → 0.5.0-dev.97

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 (143) hide show
  1. package/README.md +36 -37
  2. package/dist/channels/manifest.d.ts +1 -1
  3. package/dist/channels/manifest.d.ts.map +1 -1
  4. package/dist/channels/slack/adapter.d.ts.map +1 -1
  5. package/dist/channels/slack/adapter.js +0 -1
  6. package/dist/channels/slack/adapter.js.map +1 -1
  7. package/dist/channels/slack/http.d.ts +3 -1
  8. package/dist/channels/slack/http.d.ts.map +1 -1
  9. package/dist/channels/slack/http.js +40 -5
  10. package/dist/channels/slack/http.js.map +1 -1
  11. package/dist/channels/slack/index.d.ts +23 -8
  12. package/dist/channels/slack/index.d.ts.map +1 -1
  13. package/dist/channels/slack/index.js +32 -29
  14. package/dist/channels/slack/index.js.map +1 -1
  15. package/dist/channels/slack/normalize.d.ts +4 -1
  16. package/dist/channels/slack/normalize.d.ts.map +1 -1
  17. package/dist/channels/slack/normalize.js +46 -10
  18. package/dist/channels/slack/normalize.js.map +1 -1
  19. package/dist/channels/store.d.ts +14 -0
  20. package/dist/channels/store.d.ts.map +1 -1
  21. package/dist/channels/store.js +41 -27
  22. package/dist/channels/store.js.map +1 -1
  23. package/dist/define-deep-agent.d.ts.map +1 -1
  24. package/dist/define-deep-agent.js +9 -3
  25. package/dist/define-deep-agent.js.map +1 -1
  26. package/dist/extension.d.ts +6 -14
  27. package/dist/extension.d.ts.map +1 -1
  28. package/dist/extension.js +5 -24
  29. package/dist/extension.js.map +1 -1
  30. package/dist/identity/github/connect-http.d.ts +1 -2
  31. package/dist/identity/github/connect-http.d.ts.map +1 -1
  32. package/dist/identity/github/connect-http.js +5 -8
  33. package/dist/identity/github/connect-http.js.map +1 -1
  34. package/dist/identity/github/credentials-store.d.ts.map +1 -1
  35. package/dist/identity/github/credentials-store.js +26 -10
  36. package/dist/identity/github/credentials-store.js.map +1 -1
  37. package/dist/identity/index.d.ts +15 -71
  38. package/dist/identity/index.d.ts.map +1 -1
  39. package/dist/identity/index.js +30 -223
  40. package/dist/identity/index.js.map +1 -1
  41. package/dist/identity/oauth-env.d.ts +4 -3
  42. package/dist/identity/oauth-env.d.ts.map +1 -1
  43. package/dist/identity/oauth-env.js +4 -3
  44. package/dist/identity/oauth-env.js.map +1 -1
  45. package/dist/identity/options.d.ts +12 -71
  46. package/dist/identity/options.d.ts.map +1 -1
  47. package/dist/identity/options.js +38 -112
  48. package/dist/identity/options.js.map +1 -1
  49. package/dist/identity/slack/links.d.ts +1 -1
  50. package/dist/identity/slack/links.d.ts.map +1 -1
  51. package/dist/identity/slack/links.js +27 -11
  52. package/dist/identity/slack/links.js.map +1 -1
  53. package/dist/identity/types.d.ts +11 -42
  54. package/dist/identity/types.d.ts.map +1 -1
  55. package/dist/index.d.ts +7 -9
  56. package/dist/index.d.ts.map +1 -1
  57. package/dist/index.js +3 -2
  58. package/dist/index.js.map +1 -1
  59. package/dist/ingress/index.d.ts.map +1 -1
  60. package/dist/ingress/index.js +26 -10
  61. package/dist/ingress/index.js.map +1 -1
  62. package/dist/memory/define-memory.d.ts +39 -0
  63. package/dist/memory/define-memory.d.ts.map +1 -0
  64. package/dist/memory/define-memory.js +78 -0
  65. package/dist/memory/define-memory.js.map +1 -0
  66. package/dist/memory/index.d.ts +9 -0
  67. package/dist/memory/index.d.ts.map +1 -0
  68. package/dist/memory/index.js +8 -0
  69. package/dist/memory/index.js.map +1 -0
  70. package/dist/memory/instructions-middleware.d.ts +74 -0
  71. package/dist/memory/instructions-middleware.d.ts.map +1 -0
  72. package/dist/memory/instructions-middleware.js +115 -0
  73. package/dist/memory/instructions-middleware.js.map +1 -0
  74. package/dist/memory/slices.d.ts +21 -0
  75. package/dist/memory/slices.d.ts.map +1 -0
  76. package/dist/memory/slices.js +61 -0
  77. package/dist/memory/slices.js.map +1 -0
  78. package/dist/memory/types.d.ts +71 -0
  79. package/dist/memory/types.d.ts.map +1 -0
  80. package/dist/memory/types.js +10 -0
  81. package/dist/memory/types.js.map +1 -0
  82. package/dist/namespaces.d.ts +3 -9
  83. package/dist/namespaces.d.ts.map +1 -1
  84. package/dist/namespaces.js +2 -19
  85. package/dist/namespaces.js.map +1 -1
  86. package/dist/runtime/auth.d.ts +30 -18
  87. package/dist/runtime/auth.d.ts.map +1 -1
  88. package/dist/runtime/auth.js +179 -65
  89. package/dist/runtime/auth.js.map +1 -1
  90. package/dist/runtime/identity-http.d.ts +1 -3
  91. package/dist/runtime/identity-http.d.ts.map +1 -1
  92. package/dist/runtime/identity-http.js +23 -40
  93. package/dist/runtime/identity-http.js.map +1 -1
  94. package/dist/runtime/identity-runtime.d.ts +0 -18
  95. package/dist/runtime/identity-runtime.d.ts.map +1 -1
  96. package/dist/runtime/identity-runtime.js +0 -27
  97. package/dist/runtime/identity-runtime.js.map +1 -1
  98. package/dist/runtime/index.d.ts +2 -3
  99. package/dist/runtime/index.d.ts.map +1 -1
  100. package/dist/runtime/index.js +29 -31
  101. package/dist/runtime/index.js.map +1 -1
  102. package/dist/runtime/memory/index.d.ts +0 -3
  103. package/dist/runtime/memory/index.d.ts.map +1 -1
  104. package/dist/runtime/memory/index.js +0 -3
  105. package/dist/runtime/memory/index.js.map +1 -1
  106. package/dist/runtime/memory/mounts.d.ts +2 -10
  107. package/dist/runtime/memory/mounts.d.ts.map +1 -1
  108. package/dist/runtime/memory/mounts.js +3 -11
  109. package/dist/runtime/memory/mounts.js.map +1 -1
  110. package/dist/runtime/sandbox-manager.d.ts +5 -0
  111. package/dist/runtime/sandbox-manager.d.ts.map +1 -1
  112. package/dist/runtime/sandbox-manager.js +18 -13
  113. package/dist/runtime/sandbox-manager.js.map +1 -1
  114. package/dist/runtime/types.d.ts +8 -0
  115. package/dist/runtime/types.d.ts.map +1 -1
  116. package/dist/runtime/validated-token.d.ts +7 -12
  117. package/dist/runtime/validated-token.d.ts.map +1 -1
  118. package/dist/runtime/validated-token.js +10 -66
  119. package/dist/runtime/validated-token.js.map +1 -1
  120. package/dist/sandbox.d.ts +16 -38
  121. package/dist/sandbox.d.ts.map +1 -1
  122. package/dist/sandbox.js +9 -16
  123. package/dist/sandbox.js.map +1 -1
  124. package/dist/types.d.ts +4 -3
  125. package/dist/types.d.ts.map +1 -1
  126. package/dist/types.js.map +1 -1
  127. package/package.json +8 -8
  128. package/dist/identity/memory-slices.d.ts +0 -21
  129. package/dist/identity/memory-slices.d.ts.map +0 -1
  130. package/dist/identity/memory-slices.js +0 -105
  131. package/dist/identity/memory-slices.js.map +0 -1
  132. package/dist/runtime/memory/lazy-context-backend.d.ts +0 -74
  133. package/dist/runtime/memory/lazy-context-backend.d.ts.map +0 -1
  134. package/dist/runtime/memory/lazy-context-backend.js +0 -166
  135. package/dist/runtime/memory/lazy-context-backend.js.map +0 -1
  136. package/dist/runtime/memory/seed.d.ts +0 -30
  137. package/dist/runtime/memory/seed.d.ts.map +0 -1
  138. package/dist/runtime/memory/seed.js +0 -199
  139. package/dist/runtime/memory/seed.js.map +0 -1
  140. package/dist/runtime/memory/user-repo.d.ts +0 -18
  141. package/dist/runtime/memory/user-repo.d.ts.map +0 -1
  142. package/dist/runtime/memory/user-repo.js +0 -50
  143. package/dist/runtime/memory/user-repo.js.map +0 -1
package/dist/sandbox.js CHANGED
@@ -2,32 +2,21 @@
2
2
  * The managed `sandbox/` declaration primitive.
3
3
  *
4
4
  * A Managed Deep Agent declares its execution environment in `sandbox/index.ts`
5
- * by picking a provider from the `sandboxes` namespace. The options are typed
6
- * straight from the provider's own `create(...)` signature — MDA invents no
7
- * schema. MDA owns how the sandbox is *resolved*: construction, scoped reuse
8
- * across turns, the provisioning `setup.sh`, and lifecycle/TTL.
5
+ * with `defineSandbox`. MDA owns how the sandbox is *resolved*: construction,
6
+ * scoped reuse across turns, the provisioning `setup.sh`, and lifecycle/TTL.
9
7
  *
10
8
  * @example
11
9
  * ```ts
12
10
  * // sandbox/index.ts
13
- * import { sandboxes } from "managed-deepagents";
11
+ * import { defineSandbox } from "managed-deepagents";
14
12
  *
15
- * export const sandbox = sandboxes.langsmith({ defaultTimeout: 600 });
13
+ * export const sandbox = defineSandbox({ defaultTimeout: 600 });
16
14
  * ```
17
15
  */
18
- /** Resolve the stable provider key used for LangSmith-only validation. */
19
- export function sandboxProviderKey(provider) {
20
- const providerId = provider.providerId;
21
- if (typeof providerId === "string" && providerId.trim()) {
22
- return providerId.trim();
23
- }
24
- return typeof provider.name === "string" ? provider.name.trim() : "";
25
- }
26
16
  /**
27
17
  * Apply the default scope and reject the provider options MDA owns.
28
18
  *
29
- * Used as the `args` step of every sandbox extension, so the managed-key
30
- * rule holds no matter which provider a namespace exposes.
19
+ * Used by `defineSandbox`, so runtime-owned keys never enter a definition.
31
20
  */
32
21
  export function normalizeSandboxOptions(options) {
33
22
  const scope = options?.scope ?? "thread";
@@ -40,6 +29,10 @@ export function normalizeSandboxOptions(options) {
40
29
  }
41
30
  return { ...options, scope };
42
31
  }
32
+ /** Declare the managed execution environment for an agent. */
33
+ export function defineSandbox(options) {
34
+ return { kind: "sandbox", options: normalizeSandboxOptions(options) };
35
+ }
43
36
  function managedOptionKeys(options) {
44
37
  if (!options)
45
38
  return [];
@@ -1 +1 @@
1
- {"version":3,"file":"sandbox.js","sourceRoot":"","sources":["../src/sandbox.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAqFH,0EAA0E;AAC1E,MAAM,UAAU,kBAAkB,CAAC,QAAiC;IAClE,MAAM,UAAU,GAAG,QAAQ,CAAC,UAAU,CAAC;IACvC,IAAI,OAAO,UAAU,KAAK,QAAQ,IAAI,UAAU,CAAC,IAAI,EAAE,EAAE,CAAC;QACxD,OAAO,UAAU,CAAC,IAAI,EAAE,CAAC;IAC3B,CAAC;IACD,OAAO,OAAO,QAAQ,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;AACvE,C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C,CAAC,CAAC;IACnE,CAAC;IACD,MAAM,OAAO,GAAG,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAC3C,IAAI,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvB,MAAM,IAAI,SAAS,CACjB,GAAG,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,IACnB,OAAO,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAChC,+DAA+D,CAChE,CAAC;IACJ,CAAC;IACD,OAAO,EAAE,GAAG,OAAO,EAAE,KAAK,EAAoB,CAAC;AACjD,CAAC;AAED,8DAA8D;AAC9D,MAAM,UAAU,aAAa,CAAC,OAAwB;IACpD,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,uBAAuB,CAAC,OAAO,CAAC,EAAE,CAAC;AACxE,CAAC;AAED,SAAS,iBAAiB,CACxB,OAA4C;IAE5C,IAAI,CAAC,OAAO;QAAE,OAAO,EAAE,CAAC;IACxB,OAAO,CAAC,MAAM,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAC/D,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,CACnD,CAAC;AACJ,CAAC"}
package/dist/types.d.ts CHANGED
@@ -43,10 +43,11 @@ export type DefineDeepAgentConfig = Omit<CreateDeepAgentParams<SupportedResponse
43
43
  */
44
44
  systemPrompt?: never;
45
45
  /**
46
- * Disable managed agent memory only. Scratch state, checkpointers, skills,
47
- * instructions, and sandbox files still work.
46
+ * Removed: durable memory is declared in `memory.ts` with
47
+ * `defineMemory({ scope: "agent" })` and is off unless declared. Typed `never`
48
+ * so the old opt-out fails at the type level, not only at runtime.
48
49
  */
49
- disableMemory?: boolean;
50
+ disableMemory?: never;
50
51
  /**
51
52
  * Optional LangSmith/LangGraph run metadata applied after `createDeepAgent`
52
53
  * via `.withConfig({ metadata })`. Use this for root-trace fields such as
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACX,qBAAqB,EACrB,uBAAuB,EACvB,0BAA0B,EAC1B,uBAAuB,EACvB,eAAe,EAChB,MAAM,YAAY,CAAC;AACpB,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AACpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AACpE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAC;AAE1E;;;;GAIG;AACH,MAAM,MAAM,mBAAmB,GAC3B,SAAS,GACT,OAAO,GACP,cAAc,GACd,cAAc,GACd,QAAQ,GACR,QAAQ,CAAC;AAEb;;;;;;;;;;GAUG;AACH,MAAM,MAAM,qBAAqB,GAAG,IAAI,CACtC,qBAAqB,CACnB,uBAAuB,EACvB,gBAAgB,EAChB,SAAS,eAAe,EAAE,EAC1B,SAAS,WAAW,EAAE,EACtB,SAAS,CAAC,UAAU,GAAG,UAAU,CAAC,EAAE,EACpC,SAAS,EAAE,EACX,cAAc,GAAG,gBAAgB,GAAG,SAAS,CAC9C,EACD,mBAAmB,CACpB,GAAG;IACF;;;;OAIG;IACH,IAAI,EAAE,MAAM,CAAC;IACb,4EAA4E;IAC5E,OAAO,CAAC,EAAE,KAAK,CAAC;IAChB,mDAAmD;IACnD,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,kDAAkD;IAClD,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,qEAAqE;IACrE,MAAM,CAAC,EAAE,KAAK,CAAC;IACf,6DAA6D;IAC7D,MAAM,CAAC,EAAE,KAAK,CAAC;IACf;;;OAGG;IACH,YAAY,CAAC,EAA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BAAkB,CAAC,OAAO,CAAC,CAAC;IACpD,QAAQ,CAAC,iBAAiB,EAAE,kBAAkB,CAAC,OAAO,CAAC,CAAC;CACzD,CAAC;AAEF;;;;;GAKG;AACH,YAAY,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC"}
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAwKA,OAAO,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAyKA,OAAO,EAAE,2BAA2B,EAAE,MAAM,qBAAqB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "managed-deepagents",
3
- "version": "0.5.0-dev.90",
3
+ "version": "0.5.0-dev.97",
4
4
  "description": "Managed Deep Agents — the `defineDeepAgent` authoring interface plus the CLI that compiles and deploys a code-first Deep Agent repository to a managed LangGraph runtime.",
5
5
  "keywords": [
6
6
  "langchain",
@@ -64,16 +64,16 @@
64
64
  "zod": "^4.4.3"
65
65
  },
66
66
  "optionalDependencies": {
67
- "@langchain/managed-deepagents-darwin-arm64": "0.5.0-dev.90",
68
- "@langchain/managed-deepagents-darwin-x64": "0.5.0-dev.90",
69
- "@langchain/managed-deepagents-linux-arm64": "0.5.0-dev.90",
70
- "@langchain/managed-deepagents-linux-x64": "0.5.0-dev.90",
71
- "@langchain/managed-deepagents-win32-arm64": "0.5.0-dev.90",
72
- "@langchain/managed-deepagents-win32-x64": "0.5.0-dev.90"
67
+ "@langchain/managed-deepagents-darwin-arm64": "0.5.0-dev.97",
68
+ "@langchain/managed-deepagents-darwin-x64": "0.5.0-dev.97",
69
+ "@langchain/managed-deepagents-linux-arm64": "0.5.0-dev.97",
70
+ "@langchain/managed-deepagents-linux-x64": "0.5.0-dev.97",
71
+ "@langchain/managed-deepagents-win32-arm64": "0.5.0-dev.97",
72
+ "@langchain/managed-deepagents-win32-x64": "0.5.0-dev.97"
73
73
  },
74
74
  "devDependencies": {
75
75
  "@types/node": "^26.1.1",
76
- "oxfmt": "^0.61.0",
76
+ "oxfmt": "^0.62.0",
77
77
  "oxlint": "^1.75.0",
78
78
  "typescript": "^7.0.2",
79
79
  "vitest": "^4.1.10"
@@ -1,21 +0,0 @@
1
- /**
2
- * Memory slice helpers shared by identity normalize and the runtime.
3
- *
4
- * Resolved memory is always a list of concrete slices (empty = no memory).
5
- * Mounts are always read/write.
6
- */
7
- import type { MemoryScope, MemoryScopeInput } from "./types.js";
8
- /** True when the agent (deployment-shared) slice is enabled. */
9
- export declare function hasAgentMemorySlice(memory: MemoryScope): boolean;
10
- /** True when the private user slice is enabled. */
11
- export declare function hasUserMemorySlice(memory: MemoryScope): boolean;
12
- /** Hot-memory paths for enabled slices (agent first, user last). */
13
- export declare function hotMemoryPaths(memory: MemoryScope): string[];
14
- /**
15
- * Normalize authoring `scope.memory` into a resolved slice list.
16
- *
17
- * Rejects object slice syntax, legacy flat `"organization"`, any `partition`
18
- * field, and any `access` field (mounts are always R/W).
19
- */
20
- export declare function normalizeMemoryScope(input: MemoryScopeInput): MemoryScope;
21
- //# sourceMappingURL=memory-slices.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"memory-slices.d.ts","sourceRoot":"","sources":["../../src/identity/memory-slices.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EACV,WAAW,EACX,gBAAgB,EAGjB,MAAM,YAAY,CAAC;AAEpB,gEAAgE;AAChE,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAEhE;AAED,mDAAmD;AACnD,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAE/D;AAED,oEAAoE;AACpE,wBAAgB,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,EAAE,CAS5D;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,gBAAgB,GAAG,WAAW,CA+CzE"}
@@ -1,105 +0,0 @@
1
- /**
2
- * Memory slice helpers shared by identity normalize and the runtime.
3
- *
4
- * Resolved memory is always a list of concrete slices (empty = no memory).
5
- * Mounts are always read/write.
6
- */
7
- /** True when the agent (deployment-shared) slice is enabled. */
8
- export function hasAgentMemorySlice(memory) {
9
- return memory.some((slice) => slice.kind === "agent");
10
- }
11
- /** True when the private user slice is enabled. */
12
- export function hasUserMemorySlice(memory) {
13
- return memory.some((slice) => slice.kind === "user");
14
- }
15
- /** Hot-memory paths for enabled slices (agent first, user last). */
16
- export function hotMemoryPaths(memory) {
17
- const paths = [];
18
- if (hasAgentMemorySlice(memory)) {
19
- paths.push("/memories/agent/AGENTS.md");
20
- }
21
- if (hasUserMemorySlice(memory)) {
22
- paths.push("/memories/user/AGENTS.md");
23
- }
24
- return paths;
25
- }
26
- /**
27
- * Normalize authoring `scope.memory` into a resolved slice list.
28
- *
29
- * Rejects object slice syntax, legacy flat `"organization"`, any `partition`
30
- * field, and any `access` field (mounts are always R/W).
31
- */
32
- export function normalizeMemoryScope(input) {
33
- if (input === "none") {
34
- return [];
35
- }
36
- // Runtime guard for pre-slice authoring (`"organization"` is not in the type).
37
- if (input === "organization") {
38
- throw new Error('defineIdentity(...) `scope.memory: "organization"` is not supported. ' +
39
- "Organization identity is not supported.");
40
- }
41
- const raw = Array.isArray(input) ? input : [input];
42
- if (raw.length === 0) {
43
- return [];
44
- }
45
- const resolved = [];
46
- let sawAgent = false;
47
- let sawUser = false;
48
- for (const entry of raw) {
49
- const slice = normalizeMemorySlice(entry);
50
- if (slice.kind === "agent") {
51
- if (sawAgent) {
52
- throw new Error("defineIdentity(...) `scope.memory` lists the agent slice more than once.");
53
- }
54
- sawAgent = true;
55
- resolved.push(slice);
56
- continue;
57
- }
58
- if (sawUser) {
59
- throw new Error("defineIdentity(...) `scope.memory` lists the user slice more than once.");
60
- }
61
- sawUser = true;
62
- resolved.push(slice);
63
- }
64
- // Stable order: agent then user (matches hot-memory injection order).
65
- resolved.sort((a, b) => {
66
- if (a.kind === b.kind)
67
- return 0;
68
- return a.kind === "agent" ? -1 : 1;
69
- });
70
- return resolved;
71
- }
72
- function normalizeMemorySlice(entry) {
73
- if (entry === "user") {
74
- return { kind: "user" };
75
- }
76
- if (entry === "agent") {
77
- return { kind: "agent" };
78
- }
79
- // Runtime guard: object form is not in MemorySliceInput (reserved for later).
80
- const unknownEntry = entry;
81
- if (unknownEntry !== null && typeof unknownEntry === "object") {
82
- assertNoRetiredSliceFields(unknownEntry);
83
- throw new Error(`defineIdentity(...) unknown \`scope.memory\` entry ${JSON.stringify(unknownEntry)}. ` +
84
- 'Use string shorthands "user" or "agent".');
85
- }
86
- throw new Error(`defineIdentity(...) unknown \`scope.memory\` entry ${JSON.stringify(unknownEntry)}. ` +
87
- 'Use string shorthands "user" or "agent".');
88
- }
89
- /** Reject retired / vestigial fields on slice objects. */
90
- function assertNoRetiredSliceFields(entry) {
91
- if ("partition" in entry) {
92
- const partition = entry.partition;
93
- if (partition === "organization") {
94
- throw new Error('defineIdentity(...) memory `partition: "organization"` is not supported. ' +
95
- "Organization identity is not supported.");
96
- }
97
- throw new Error("defineIdentity(...) memory `partition` is not supported. " +
98
- "User memory is always per-caller keyed — omit `partition`.");
99
- }
100
- if ("access" in entry) {
101
- throw new Error("defineIdentity(...) memory `access` is not supported. " +
102
- "Memory mounts are always read/write — omit `access`.");
103
- }
104
- }
105
- //# sourceMappingURL=memory-slices.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"memory-slices.js","sourceRoot":"","sources":["../../src/identity/memory-slices.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AASH,gEAAgE;AAChE,MAAM,UAAU,mBAAmB,CAAC,MAAmB;IACrD,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE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K,CACb,sDAAsD,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,IAAI;YACpF,0CAA0C,CAC7C,CAAC;IACJ,CAAC;IACD,MAAM,IAAI,KAAK,CACb,sDAAsD,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,IAAI;QACpF,0CAA0C,CAC7C,CAAC;AACJ,CAAC;AAED,0DAA0D;AAC1D,SAAS,0BAA0B,CAAC,KAAa;IAC/C,IAAI,WAAW,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,SAAS,GAAI,KAAiC,CAAC,SAAS,CAAC;QAC/D,IAAI,SAAS,KAAK,cAAc,EAAE,CAAC;YACjC,MAAM,IAAI,KAAK,CACb,2EAA2E;gBACzE,yCAAyC,CAC5C,CAAC;QACJ,CAAC;QACD,MAAM,IAAI,KAAK,CACb,2DAA2D;YACzD,4DAA4D,CAC/D,CAAC;IACJ,CAAC;IACD,IAAI,QAAQ,IAAI,KAAK,EAAE,CAAC;QACtB,MAAM,IAAI,KAAK,CACb,wDAAwD;YACtD,sDAAsD,CACzD,CAAC;IACJ,CAAC;AACH,CAAC"}
@@ -1,74 +0,0 @@
1
- /**
2
- * Lazy per-run CompositeBackend for identity-scoped user memory (+ optional
3
- * always-on agent slice from the deploy Hub).
4
- *
5
- * deepagents prefers a pre-constructed BackendProtocol instance over a factory.
6
- * This facade remounts `/memories/user` from the ambient LangGraph configurable
7
- * on each operation — the TypeScript counterpart of Python
8
- * `LazyPerRunContextBackend`.
9
- */
10
- import type { BackendProtocolV2 } from "deepagents";
11
- import { type IdentityConfig } from "../../identity/index.js";
12
- import type { LazyManagedSandboxBackend } from "../backend.js";
13
- export type LazyPerRunContextBackendDeps = {
14
- contextBackend: BackendProtocolV2;
15
- localRoot: string | undefined;
16
- deployHandle: string;
17
- sandboxBackend: LazyManagedSandboxBackend | undefined;
18
- identityConfig: IdentityConfig;
19
- };
20
- /**
21
- * Lazy CompositeBackend facade that remounts per-user memory.
22
- *
23
- * Construct unbound via {@link LazyPerRunContextBackend.create}, or call
24
- * {@link forRuntime} so concurrent requests each freeze their own
25
- * `configurable`.
26
- *
27
- * Only the memory mount (open + seed) is cached by user repo handle. The
28
- * CompositeBackend is rebuilt per operation with a fresh `forRuntime` sandbox
29
- * so thread-scoped sandboxes stay isolated across concurrent runs.
30
- */
31
- export declare class LazyPerRunContextBackend {
32
- private readonly deps;
33
- private readonly memoryCache;
34
- private readonly pendingMemory;
35
- private readonly boundConfigurable;
36
- /** Matches deepagents CompositeBackend; FilesystemMiddleware reads this. */
37
- readonly artifactsRoot = "/";
38
- private constructor();
39
- /** Build the unbound backend used at compile time. */
40
- static create(deps: LazyPerRunContextBackendDeps): LazyPerRunContextBackend;
41
- /** Per-run sibling with this request's `configurable` frozen. */
42
- forRuntime(runtime: unknown): LazyPerRunContextBackend;
43
- /**
44
- * Duck-type as CompositeBackend for deepagents
45
- * (`CompositeBackend.isInstance` checks `Array.isArray(routePrefixes)`).
46
- */
47
- get routePrefixes(): string[];
48
- /**
49
- * Mirror CompositeBackend: expose the sandbox default's id so deepagents'
50
- * `isSandboxBackend` / `adaptSandboxProtocol` keep `execute` mounted.
51
- *
52
- * Without this, user memory remounts strip shell even when
53
- * {@link LazyManagedSandboxBackend} itself advertises a pending id.
54
- */
55
- get id(): string;
56
- ls(path?: string): Promise<import("deepagents").LsResult>;
57
- read(filePath: string, offset?: number, limit?: number): Promise<import("deepagents").ReadResult>;
58
- readRaw(filePath: string): Promise<unknown>;
59
- grep(pattern: string, path?: string | null, glob?: string | null): Promise<import("deepagents").GrepResult>;
60
- glob(pattern: string, path?: string): Promise<import("deepagents").GlobResult>;
61
- write(filePath: string, content: string): Promise<import("deepagents").WriteResult>;
62
- edit(filePath: string, oldString: string, newString: string, replaceAll?: boolean): Promise<import("deepagents").EditResult>;
63
- delete(filePath: string): Promise<unknown>;
64
- uploadFiles(files: Array<[string, Uint8Array]>): Promise<import("deepagents").FileUploadResponse[]>;
65
- downloadFiles(paths: string[]): Promise<import("deepagents").FileDownloadResponse[]>;
66
- execute(command: string): Promise<import("deepagents").ExecuteResponse>;
67
- private memoryCacheKey;
68
- private runtimeBag;
69
- /** Rebuild composite each call with a per-run sandbox + cached memory mount. */
70
- private composite;
71
- private memoryUser;
72
- private resolveMemoryUser;
73
- }
74
- //# sourceMappingURL=lazy-context-backend.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lazy-context-backend.d.ts","sourceRoot":"","sources":["../../../src/runtime/memory/lazy-context-backend.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAoB,MAAM,YAAY,CAAC;AAEtE,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAW/D,MAAM,MAAM,4BAA4B,GAAG;IACzC,cAAc,EAAE,iBAAiB,CAAC;IAClC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,yBAAyB,GAAG,SAAS,CAAC;IACtD,cAAc,EAAE,cAAc,CAAC;CAChC,CAAC;AAEF;;;;;;;;;;GAUG;AACH,qBAAa,wBAAwB;IAKjC,OAAO,CAAC,QAAQ,CAAC,IAAI;IACrB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAC9B,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAPpC,4EAA4E;IAC5E,QAAQ,CAAC,aAAa,OAAO;IAE7B,OAAO,eAKH;IAEJ,sDAAsD;IACtD,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,4BAA4B,GAAG,wBAAwB,CAE1E;IAED,iEAAiE;IACjE,UAAU,CAAC,OAAO,EAAE,OAAO,GAAG,wBAAwB,CAUrD;IAED;;;OAGG;IACH,IAAI,aAAa,IAAI,MAAM,EAAE,CAM5B;IAED;;;;;;OAMG;IACH,IAAI,EAAE,IAAI,MAAM,CAEf;IAEK,EAAE,CAAC,IAAI,SAAM,0CAElB;IAEK,IAAI,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,4CAE3D;IAEK,OAAO,CAAC,QAAQ,EAAE,MAAM,oBAW7B;IAEK,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,4CAErE;IAEK,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,4CAExC;IAEK,KAAK,CAAC,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,6CAE5C;IAEK,IAAI,CACR,QAAQ,EAAE,MAAM,EAChB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,UAAU,UAAQ,4CAQnB;IAEK,MAAM,CAAC,QAAQ,EAAE,MAAM,oBAQ5B;IAEK,WAAW,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC,sDAEnD;IAEK,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,wDAElC;IAEK,OAAO,CAAC,OAAO,EAAE,MAAM,iDAE5B;IAED,OAAO,CAAC,cAAc;IAStB,OAAO,CAAC,UAAU;IAOlB,gFAAgF;YAClE,SAAS;IAWvB,OAAO,CAAC,UAAU;YA0BJ,iBAAiB;CAqBhC"}
@@ -1,166 +0,0 @@
1
- /**
2
- * Lazy per-run CompositeBackend for identity-scoped user memory (+ optional
3
- * always-on agent slice from the deploy Hub).
4
- *
5
- * deepagents prefers a pre-constructed BackendProtocol instance over a factory.
6
- * This facade remounts `/memories/user` from the ambient LangGraph configurable
7
- * on each operation — the TypeScript counterpart of Python
8
- * `LazyPerRunContextBackend`.
9
- */
10
- import { hasAgentMemorySlice, } from "../../identity/index.js";
11
- import { resolveRuntimeConfigurable } from "../identity-runtime.js";
12
- import { managedContextBackend } from "./mounts.js";
13
- import { ensureUserMemorySeed } from "./seed.js";
14
- import { openUserMemoryBackend, resolveRunMemoryRepoHandle, } from "./user-repo.js";
15
- const UNAUTHENTICATED_KEY = "__unauthenticated__";
16
- /**
17
- * Lazy CompositeBackend facade that remounts per-user memory.
18
- *
19
- * Construct unbound via {@link LazyPerRunContextBackend.create}, or call
20
- * {@link forRuntime} so concurrent requests each freeze their own
21
- * `configurable`.
22
- *
23
- * Only the memory mount (open + seed) is cached by user repo handle. The
24
- * CompositeBackend is rebuilt per operation with a fresh `forRuntime` sandbox
25
- * so thread-scoped sandboxes stay isolated across concurrent runs.
26
- */
27
- export class LazyPerRunContextBackend {
28
- deps;
29
- memoryCache;
30
- pendingMemory;
31
- boundConfigurable;
32
- /** Matches deepagents CompositeBackend; FilesystemMiddleware reads this. */
33
- artifactsRoot = "/";
34
- constructor(deps, memoryCache, pendingMemory, boundConfigurable) {
35
- this.deps = deps;
36
- this.memoryCache = memoryCache;
37
- this.pendingMemory = pendingMemory;
38
- this.boundConfigurable = boundConfigurable;
39
- }
40
- /** Build the unbound backend used at compile time. */
41
- static create(deps) {
42
- return new LazyPerRunContextBackend(deps, new Map(), new Map(), undefined);
43
- }
44
- /** Per-run sibling with this request's `configurable` frozen. */
45
- forRuntime(runtime) {
46
- const configurable = resolveRuntimeConfigurable(runtime);
47
- return new LazyPerRunContextBackend(this.deps, this.memoryCache, this.pendingMemory, configurable);
48
- }
49
- /**
50
- * Duck-type as CompositeBackend for deepagents
51
- * (`CompositeBackend.isInstance` checks `Array.isArray(routePrefixes)`).
52
- */
53
- get routePrefixes() {
54
- const prefixes = ["/instructions.md", "/skills/", "/memories/user/"];
55
- if (hasAgentMemorySlice(this.deps.identityConfig.scope.memory)) {
56
- prefixes.push("/memories/agent/");
57
- }
58
- return prefixes;
59
- }
60
- /**
61
- * Mirror CompositeBackend: expose the sandbox default's id so deepagents'
62
- * `isSandboxBackend` / `adaptSandboxProtocol` keep `execute` mounted.
63
- *
64
- * Without this, user memory remounts strip shell even when
65
- * {@link LazyManagedSandboxBackend} itself advertises a pending id.
66
- */
67
- get id() {
68
- return this.deps.sandboxBackend?.id ?? "";
69
- }
70
- async ls(path = "/") {
71
- return (await this.composite()).ls(path);
72
- }
73
- async read(filePath, offset, limit) {
74
- return (await this.composite()).read(filePath, offset, limit);
75
- }
76
- async readRaw(filePath) {
77
- const backend = await this.composite();
78
- const readRaw = backend.readRaw;
79
- if (typeof readRaw === "function") {
80
- return readRaw.call(backend, filePath);
81
- }
82
- return backend.read(filePath);
83
- }
84
- async grep(pattern, path, glob) {
85
- return (await this.composite()).grep(pattern, path, glob);
86
- }
87
- async glob(pattern, path) {
88
- return (await this.composite()).glob(pattern, path);
89
- }
90
- async write(filePath, content) {
91
- return (await this.composite()).write(filePath, content);
92
- }
93
- async edit(filePath, oldString, newString, replaceAll = false) {
94
- return (await this.composite()).edit(filePath, oldString, newString, replaceAll);
95
- }
96
- async delete(filePath) {
97
- const backend = await this.composite();
98
- const del = backend.delete;
99
- return del?.call(backend, filePath);
100
- }
101
- async uploadFiles(files) {
102
- return (await this.composite()).uploadFiles?.(files);
103
- }
104
- async downloadFiles(paths) {
105
- return (await this.composite()).downloadFiles?.(paths);
106
- }
107
- async execute(command) {
108
- return (await this.composite()).execute(command);
109
- }
110
- memoryCacheKey(runtime) {
111
- const handle = resolveRunMemoryRepoHandle(this.deps.deployHandle, this.deps.identityConfig, runtime);
112
- return handle ?? UNAUTHENTICATED_KEY;
113
- }
114
- runtimeBag() {
115
- if (this.boundConfigurable === undefined) {
116
- return undefined;
117
- }
118
- return { configurable: this.boundConfigurable };
119
- }
120
- /** Rebuild composite each call with a per-run sandbox + cached memory mount. */
121
- async composite() {
122
- const runtime = this.runtimeBag();
123
- const scopedSandbox = this.deps.sandboxBackend?.forRuntime(runtime);
124
- return managedContextBackend(this.deps.contextBackend, scopedSandbox, await this.memoryUser(runtime), hasAgentMemorySlice(this.deps.identityConfig.scope.memory));
125
- }
126
- memoryUser(runtime) {
127
- const key = this.memoryCacheKey(runtime);
128
- const hit = this.memoryCache.get(key);
129
- if (hit !== undefined) {
130
- return Promise.resolve(hit);
131
- }
132
- const pending = this.pendingMemory.get(key);
133
- if (pending) {
134
- return pending;
135
- }
136
- // Cache only successful mounts. Clear pending on settle so a rejected
137
- // open/seed (e.g. transient Context Hub failure) can retry next call.
138
- const resolving = this.resolveMemoryUser(runtime)
139
- .then((mount) => {
140
- this.memoryCache.set(key, mount);
141
- return mount;
142
- })
143
- .finally(() => {
144
- if (this.pendingMemory.get(key) === resolving) {
145
- this.pendingMemory.delete(key);
146
- }
147
- });
148
- this.pendingMemory.set(key, resolving);
149
- return resolving;
150
- }
151
- async resolveMemoryUser(runtime) {
152
- const userRepo = resolveRunMemoryRepoHandle(this.deps.deployHandle, this.deps.identityConfig, runtime);
153
- if (userRepo === null) {
154
- return null;
155
- }
156
- const memoryBackend = await openUserMemoryBackend(userRepo, this.deps.localRoot);
157
- await ensureUserMemorySeed({
158
- userBackend: memoryBackend.backend,
159
- deployBackend: this.deps.contextBackend,
160
- localRoot: memoryBackend.rootDir,
161
- deployRoot: this.deps.localRoot,
162
- });
163
- return { kind: "repo", backend: memoryBackend.backend };
164
- }
165
- }
166
- //# sourceMappingURL=lazy-context-backend.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lazy-context-backend.js","sourceRoot":"","sources":["../../../src/runtime/memory/lazy-context-backend.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAIH,OAAO,EACL,mBAAmB,GAEpB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACpE,OAAO,EAAE,qBAAqB,EAAwB,MAAM,aAAa,CAAC;AAC1E,OAAO,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AACjD,OAAO,EACL,qBAAqB,EACrB,0BAA0B,GAC3B,MAAM,gBAAgB,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AE,SAAS,CAAC,CAAC;QACvC,OAAO,SAAS,CAAC;IACnB,CAAC;IAEO,KAAK,CAAC,iBAAiB,CAAC,OAAgB;QAC9C,MAAM,QAAQ,GAAG,0BAA0B,CACzC,IAAI,CAAC,IAAI,CAAC,YAAY,EACtB,IAAI,CAAC,IAAI,CAAC,cAAc,EACxB,OAAO,CACR,CAAC;QACF,IAAI,QAAQ,KAAK,IAAI,EAAE,CAAC;YACtB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,MAAM,aAAa,GAAG,MAAM,qBAAqB,CAC/C,QAAQ,EACR,IAAI,CAAC,IAAI,CAAC,SAAS,CACpB,CAAC;QACF,MAAM,oBAAoB,CAAC;YACzB,WAAW,EAAE,aAAa,CAAC,OAAO;YAClC,aAAa,EAAE,IAAI,CAAC,IAAI,CAAC,cAAc;YACvC,SAAS,EAAE,aAAa,CAAC,OAAO;YAChC,UAAU,EAAE,IAAI,CAAC,IAAI,CAAC,SAAS;SAChC,CAAC,CAAC;QACH,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,aAAa,CAAC,OAAO,EAAE,CAAC;IAC1D,CAAC;CACF"}
@@ -1,30 +0,0 @@
1
- import type { BackendProtocolV2 } from "deepagents";
2
- /** Fallback hot-memory seed when the hub has no agent/flat AGENTS.md. */
3
- export declare const LOCAL_MEMORY_SEED = "<!-- MANAGED-DEEPAGENTS MEMORY INSTRUCTIONS: DO NOT DELETE -->\n# Memory Instructions\n\nManaged Deep Agents mounts durable memory under `/memories/` when enabled:\n\n- `/memories/agent/` \u2014 deployment-shared procedural memory (read/write; all callers)\n- `/memories/user/` \u2014 this run's private personal slice (read/write)\n\n## Hot memory (always loaded when the slice is enabled)\n\n- `/memories/agent/AGENTS.md` \u2014 shared processes, playbooks, agent-wide facts\n- `/memories/user/AGENTS.md` \u2014 compact personal preferences for this caller\n\nRules:\n\n- Keep hot files small. Prefer bullet points over long prose.\n- When adding new hot entries, remove or compress stale ones in the same edit.\n- Use only `read_file` / `edit_file` on these paths (not shell paths).\n- Cold files go under the matching tree (for example `/memories/user/archive/` or `/memories/agent/processes/`).\n- Do not store secrets, API keys, OAuth tokens, or passwords in any memory file.\n\n<!-- END MANAGED-DEEPAGENTS MEMORY INSTRUCTIONS: DO NOT DELETE -->\n";
4
- /**
5
- * True when a managed memory seed still teaches an obsolete layout.
6
- *
7
- * Stale templates omit `/memories/agent/` or still mention removed `/memories/org`.
8
- */
9
- export declare function memorySeedNeedsRefresh(content: string | undefined): boolean;
10
- /**
11
- * Replace only the managed instruction block, preserving author notes outside it.
12
- *
13
- * When the end marker is missing (truncated legacy templates), replaces from the
14
- * start marker through EOF. Content before the start marker is kept.
15
- */
16
- export declare function refreshManagedMemoryInstructions(content: string, template?: string): string;
17
- /**
18
- * Seed `/AGENTS.md` in a per-user memory repo from the deploy agent template.
19
- * First write creates the Hub repo via LangSmith `pushAgent`.
20
- *
21
- * Stale managed instruction blocks are refreshed in place; notes outside the
22
- * managed markers are preserved.
23
- */
24
- export declare function ensureUserMemorySeed(options: {
25
- userBackend: BackendProtocolV2;
26
- deployBackend: BackendProtocolV2;
27
- localRoot?: string;
28
- deployRoot?: string;
29
- }): Promise<void>;
30
- //# sourceMappingURL=seed.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"seed.d.ts","sourceRoot":"","sources":["../../../src/runtime/memory/seed.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAuDpD,yEAAyE;AACzE,eAAO,MAAM,iBAAiB,kiCAsB7B,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAY3E;AAED;;;;;GAKG;AACH,wBAAgB,gCAAgC,CAC9C,OAAO,EAAE,MAAM,EACf,QAAQ,GAAE,MAA0B,GACnC,MAAM,CAiBR;AAqCD;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CAAC,OAAO,EAAE;IAClD,WAAW,EAAE,iBAAiB,CAAC;IAC/B,aAAa,EAAE,iBAAiB,CAAC;IACjC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,GAAG,OAAO,CAAC,IAAI,CAAC,CA6DhB"}