@cortexkit/opencode-magic-context 0.21.5 → 0.21.7
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/README.md +1 -1
- package/dist/agents/permissions.d.ts +142 -0
- package/dist/agents/permissions.d.ts.map +1 -0
- package/dist/config/agent-disable.d.ts +26 -0
- package/dist/config/agent-disable.d.ts.map +1 -0
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/schema/agent-overrides.d.ts +12 -12
- package/dist/config/schema/magic-context.d.ts +87 -93
- package/dist/config/schema/magic-context.d.ts.map +1 -1
- package/dist/features/magic-context/compartment-lease.d.ts +14 -0
- package/dist/features/magic-context/compartment-lease.d.ts.map +1 -0
- package/dist/features/magic-context/compartment-storage.d.ts +5 -1
- package/dist/features/magic-context/compartment-storage.d.ts.map +1 -1
- package/dist/features/magic-context/compression-depth-storage.d.ts +2 -1
- package/dist/features/magic-context/compression-depth-storage.d.ts.map +1 -1
- package/dist/features/magic-context/migrations.d.ts.map +1 -1
- package/dist/features/magic-context/storage-db.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta-persisted.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta-session.d.ts.map +1 -1
- package/dist/features/magic-context/storage.d.ts +1 -1
- package/dist/features/magic-context/storage.d.ts.map +1 -1
- package/dist/hooks/magic-context/auto-search-runner.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-compressor.d.ts +4 -0
- package/dist/hooks/magic-context/compartment-runner-compressor.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-incremental.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-partial-recomp.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-recomp.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-types.d.ts +2 -0
- package/dist/hooks/magic-context/compartment-runner-types.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner.d.ts +5 -0
- package/dist/hooks/magic-context/compartment-runner.d.ts.map +1 -1
- package/dist/hooks/magic-context/hook.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-compartment-phase.d.ts +2 -2
- package/dist/hooks/magic-context/transform-compartment-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts +1 -0
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform.d.ts +2 -0
- package/dist/hooks/magic-context/transform.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +680 -188
- package/dist/plugin/conflict-warning-hook.d.ts +10 -0
- package/dist/plugin/conflict-warning-hook.d.ts.map +1 -1
- package/dist/plugin/dream-timer.d.ts.map +1 -1
- package/dist/plugin/hooks/create-session-hooks.d.ts.map +1 -1
- package/dist/plugin/rpc-handlers.d.ts +1 -1
- package/dist/plugin/rpc-handlers.d.ts.map +1 -1
- package/dist/plugin/tool-registry.d.ts.map +1 -1
- package/dist/shared/announcement.d.ts +55 -0
- package/dist/shared/announcement.d.ts.map +1 -0
- package/dist/shared/format-threshold.d.ts +24 -0
- package/dist/shared/format-threshold.d.ts.map +1 -0
- package/dist/shared/rpc-types.d.ts +10 -0
- package/dist/shared/rpc-types.d.ts.map +1 -1
- package/dist/tui/data/context-db.d.ts +14 -0
- package/dist/tui/data/context-db.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/shared/announcement.test.ts +143 -0
- package/src/shared/announcement.ts +97 -0
- package/src/shared/format-threshold.ts +28 -0
- package/src/shared/rpc-types.ts +10 -0
- package/src/tui/data/context-db.ts +44 -0
- package/src/tui/index.tsx +75 -6
- package/src/tui/slots/sidebar-content.tsx +24 -3
package/README.md
CHANGED
|
@@ -386,7 +386,7 @@ On startup, Magic Context checks for common configuration problems — OpenCode'
|
|
|
386
386
|
A companion desktop app for browsing and managing Magic Context state outside of OpenCode.
|
|
387
387
|
|
|
388
388
|
<p align="center">
|
|
389
|
-
<a href="https://github.com/cortexkit/magic-context/releases/tag/dashboard-v0.4.
|
|
389
|
+
<a href="https://github.com/cortexkit/magic-context/releases/tag/dashboard-v0.4.8"><strong>⬇️ Download for macOS · Windows · Linux</strong></a></p>
|
|
390
390
|
|
|
391
391
|
**Features:**
|
|
392
392
|
- **Memory Browser** — search, filter, and edit project memories with category and project filtering
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Permission rulesets for Magic Context's hidden subagents.
|
|
3
|
+
*
|
|
4
|
+
* # Why this exists
|
|
5
|
+
*
|
|
6
|
+
* Hidden agents (`historian`, `historian-editor`, `dreamer`, `sidekick`) are
|
|
7
|
+
* registered with `mode: "subagent"` and `hidden: true`, but those flags
|
|
8
|
+
* only control visibility in the UI picker — they do NOT restrict which
|
|
9
|
+
* tools the spawned session can call. By default a registered subagent
|
|
10
|
+
* inherits the FULL primary-agent tool surface: `task`, `bash`, `edit`,
|
|
11
|
+
* `webfetch`, `websearch`, `read`, `grep`, `glob`, every MCP tool, etc.
|
|
12
|
+
*
|
|
13
|
+
* That default is wrong for our agents:
|
|
14
|
+
* - Historian should be a pure XML-emitting summarizer. It must not
|
|
15
|
+
* dispatch `task(subagent_type=explore)` to fan out, edit files,
|
|
16
|
+
* run bash, or fetch the web — its job is to read offloaded state
|
|
17
|
+
* files and emit `<compartment>` blocks.
|
|
18
|
+
* - The `task` permission only gets auto-denied when an agent is
|
|
19
|
+
* INVOKED via the parent's `task()` tool (see OpenCode's
|
|
20
|
+
* `deriveSubagentSessionPermission`). Our hidden agents are spawned
|
|
21
|
+
* directly via `client.session.prompt(...)` from the plugin
|
|
22
|
+
* runtime, so that auto-deny never fires — they get the same
|
|
23
|
+
* `task` permission as a primary `build` agent.
|
|
24
|
+
*
|
|
25
|
+
* # Design
|
|
26
|
+
*
|
|
27
|
+
* Each hidden agent's `permission` field starts with `{ "*": "deny" }`
|
|
28
|
+
* and adds explicit `allow` entries for ONLY the tool ids it needs.
|
|
29
|
+
* OpenCode's `Permission.fromConfig` converts this flat map into a
|
|
30
|
+
* `Rule[]` ruleset where later entries override earlier ones, so the
|
|
31
|
+
* named allows always win against the wildcard deny.
|
|
32
|
+
*
|
|
33
|
+
* This is the same pattern OpenCode's own `explore` subagent uses
|
|
34
|
+
* (see `packages/opencode/src/agent/agent.ts:179-201`).
|
|
35
|
+
*
|
|
36
|
+
* User-supplied agent overrides (`pluginConfig.historian.permission`,
|
|
37
|
+
* etc.) still merge on top via OpenCode's `Permission.merge`, so
|
|
38
|
+
* advanced users can extend the allow-list without us blocking them.
|
|
39
|
+
*
|
|
40
|
+
* # What each agent needs
|
|
41
|
+
*
|
|
42
|
+
* - **historian / historian-editor / compressor**: `read` plus the
|
|
43
|
+
* read-only AFT navigation tools `aft_outline` and `aft_zoom`.
|
|
44
|
+
* The runner offloads large existing-state XML to a temp file
|
|
45
|
+
* under `<project>/.opencode/magic-context/historian/` and the
|
|
46
|
+
* prompt instructs the model to read that file. AFT navigation
|
|
47
|
+
* is allowed so historian can verify a symbol or file structure
|
|
48
|
+
* when writing accurate compartment summaries.
|
|
49
|
+
*
|
|
50
|
+
* - **dreamer**: `read`, `grep`, `glob`, `bash`, the read-only AFT
|
|
51
|
+
* navigation tools `aft_outline` and `aft_zoom`, plus the Magic
|
|
52
|
+
* Context MCP tools `ctx_memory`, `ctx_search`, `ctx_note`.
|
|
53
|
+
* Dreamer task prompts in
|
|
54
|
+
* `features/magic-context/dreamer/task-prompts.ts` explicitly tell
|
|
55
|
+
* the model to grep schema files for defaults, read source to
|
|
56
|
+
* confirm claims, run `git log` / `gh` / `curl` for verify and
|
|
57
|
+
* smart-note evaluation, and use glob/find for directory
|
|
58
|
+
* inventory. Live DB shows >100 bash invocations across all
|
|
59
|
+
* dreamer task variants. `task` / `edit` / `write` / `webfetch` /
|
|
60
|
+
* `websearch` remain denied — dreamer must not spawn subagents
|
|
61
|
+
* or commit changes.
|
|
62
|
+
*
|
|
63
|
+
* - **sidekick**: `ctx_search`, `ctx_memory`, plus the read-only AFT
|
|
64
|
+
* navigation tools `aft_outline` and `aft_zoom`. Sidekick's job
|
|
65
|
+
* is augmenting user prompts via memory retrieval — see
|
|
66
|
+
* `features/magic-context/sidekick/agent.ts`. AFT navigation lets
|
|
67
|
+
* it pull symbol-scoped structural context for prompts that
|
|
68
|
+
* reference a specific file or symbol.
|
|
69
|
+
*/
|
|
70
|
+
/**
|
|
71
|
+
* Build a `permission` map suitable for `AgentConfig.permission`. Starts
|
|
72
|
+
* with a wildcard deny, then layers in the named tool allows on top.
|
|
73
|
+
* OpenCode's `Permission.fromConfig` preserves insertion order and its
|
|
74
|
+
* `evaluate` uses `findLast`, so named allows defeat the wildcard deny.
|
|
75
|
+
*
|
|
76
|
+
* Returns `Record<string, "deny" | "allow">` which the SDK's
|
|
77
|
+
* `AgentConfig.permission` type accepts via its `[key: string]: unknown`
|
|
78
|
+
* index signature. The same pattern is used by OpenCode's built-in
|
|
79
|
+
* `explore`/`scout`/`general` agents and by Alfonso for its static
|
|
80
|
+
* agent profiles.
|
|
81
|
+
*/
|
|
82
|
+
export declare function buildAllowOnlyPermission(allowedTools: readonly string[]): Record<string, "deny" | "allow">;
|
|
83
|
+
/**
|
|
84
|
+
* Tools the historian + historian-editor + compressor agents need.
|
|
85
|
+
*
|
|
86
|
+
* Historian runners offload large `<existing_state>` XML to disk and
|
|
87
|
+
* tell the model to `read` it before emitting the summary XML. The
|
|
88
|
+
* core need is `read`; we also allow the read-only AFT navigation
|
|
89
|
+
* tools `aft_outline` and `aft_zoom` so that if a historian/compressor
|
|
90
|
+
* ever needs to verify a symbol or skim a file's structure to write
|
|
91
|
+
* an accurate compartment summary, it can do so token-efficiently
|
|
92
|
+
* instead of pulling whole files via `read`.
|
|
93
|
+
*
|
|
94
|
+
* Still denied: bash, edit, write, task, grep/glob, webfetch/
|
|
95
|
+
* websearch. Historian's job is summarizing the input it was given,
|
|
96
|
+
* not exploring the repo.
|
|
97
|
+
*/
|
|
98
|
+
export declare const HISTORIAN_ALLOWED_TOOLS: readonly ["read", "aft_outline", "aft_zoom"];
|
|
99
|
+
/**
|
|
100
|
+
* Tools the dreamer agent needs. This is the broadest hidden-agent
|
|
101
|
+
* surface because dreamer's tasks legitimately require local-repo
|
|
102
|
+
* exploration plus external command execution:
|
|
103
|
+
*
|
|
104
|
+
* - `ctx_memory` / `ctx_search` / `ctx_note` — the canonical memory
|
|
105
|
+
* CRUD and retrieval path for consolidate / verify / archive /
|
|
106
|
+
* improve and smart-note dismissal.
|
|
107
|
+
* - `read` / `grep` / `glob` — the verify task prompt
|
|
108
|
+
* (`task-prompts.ts`) explicitly tells the model to grep schema
|
|
109
|
+
* files for default values, read source to confirm claimed
|
|
110
|
+
* behavior, and use glob for project structure inventory.
|
|
111
|
+
* - `bash` — required for smart-note condition evaluation (the
|
|
112
|
+
* prompt explicitly mentions `gh` / `git` / `curl` / file reads),
|
|
113
|
+
* for the verify task's `git log --oneline --since=...` step, and
|
|
114
|
+
* for the improve task's `find` / `grep` directory inventory. The
|
|
115
|
+
* live OpenCode DB shows over 100 `bash` invocations across
|
|
116
|
+
* consolidate / verify / improve / archive-stale / smart-notes
|
|
117
|
+
* dreamer child sessions, so removing it would regress real,
|
|
118
|
+
* documented dreamer behavior.
|
|
119
|
+
*
|
|
120
|
+
* Deliberately NOT allowed:
|
|
121
|
+
* - `task` — no subagent fanout from dreamer
|
|
122
|
+
* - `edit` / `write` — dreamer must not modify project files;
|
|
123
|
+
* `task-prompts.ts` explicitly states "Do not commit changes"
|
|
124
|
+
* - `webfetch` / `websearch` — out of scope; smart-note URL fetches
|
|
125
|
+
* go through `bash` + `curl` instead
|
|
126
|
+
*/
|
|
127
|
+
export declare const DREAMER_ALLOWED_TOOLS: readonly ["read", "grep", "glob", "bash", "aft_outline", "aft_zoom", "ctx_memory", "ctx_search", "ctx_note"];
|
|
128
|
+
/**
|
|
129
|
+
* Tools the sidekick agent needs. Sidekick is a read-only memory
|
|
130
|
+
* retriever for `/ctx-aug` — it queries the project's memory store
|
|
131
|
+
* via `ctx_search` and (rarely) reads specific memories with
|
|
132
|
+
* `ctx_memory(action="list")`.
|
|
133
|
+
*
|
|
134
|
+
* Also allow `aft_outline` and `aft_zoom` so sidekick can pull
|
|
135
|
+
* lightweight structural context about a file or symbol when the
|
|
136
|
+
* user's prompt references it directly — token-efficient navigation
|
|
137
|
+
* without dragging in whole files.
|
|
138
|
+
*
|
|
139
|
+
* Still denied: spawning subagents, edits, bash, web fetches.
|
|
140
|
+
*/
|
|
141
|
+
export declare const SIDEKICK_ALLOWED_TOOLS: readonly ["ctx_search", "ctx_memory", "aft_outline", "aft_zoom"];
|
|
142
|
+
//# sourceMappingURL=permissions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../src/agents/permissions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AAEH;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CACpC,YAAY,EAAE,SAAS,MAAM,EAAE,GAChC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,CAMlC;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,uBAAuB,8CAA+C,CAAC;AAEpF;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,eAAO,MAAM,qBAAqB,8GAUxB,CAAC;AAEX;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,sBAAsB,kEAKzB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare function isAgentDisabled(agent?: {
|
|
2
|
+
disable?: boolean;
|
|
3
|
+
} | null): boolean;
|
|
4
|
+
export declare function isDreamerRunnable(config: {
|
|
5
|
+
dreamer?: {
|
|
6
|
+
disable?: boolean;
|
|
7
|
+
} | null;
|
|
8
|
+
}): boolean;
|
|
9
|
+
export declare function isDreamerScheduled(config: {
|
|
10
|
+
dreamer?: {
|
|
11
|
+
disable?: boolean;
|
|
12
|
+
schedule?: string;
|
|
13
|
+
} | null;
|
|
14
|
+
}): boolean;
|
|
15
|
+
export declare function isSidekickRunnable(config: {
|
|
16
|
+
sidekick?: {
|
|
17
|
+
disable?: boolean;
|
|
18
|
+
} | null;
|
|
19
|
+
}): boolean;
|
|
20
|
+
export declare function isHistorianRunnable(config: {
|
|
21
|
+
historian?: {
|
|
22
|
+
disable?: boolean;
|
|
23
|
+
} | null;
|
|
24
|
+
}): boolean;
|
|
25
|
+
export declare function migrateLegacyAgentEnabledInMemory(rawConfig: Record<string, unknown>, warnings: string[]): Record<string, unknown>;
|
|
26
|
+
//# sourceMappingURL=agent-disable.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-disable.d.ts","sourceRoot":"","sources":["../../src/config/agent-disable.ts"],"names":[],"mappings":"AAAA,wBAAgB,eAAe,CAAC,KAAK,CAAC,EAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,GAAG,OAAO,CAE7E;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE;IAAE,OAAO,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAA;CAAE,GAAG,OAAO,CAE7F;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE;IACvC,OAAO,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CAC7D,GAAG,OAAO,CAEV;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE;IAAE,QAAQ,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAA;CAAE,GAAG,OAAO,CAE/F;AAED,wBAAgB,mBAAmB,CAAC,MAAM,EAAE;IAAE,SAAS,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,IAAI,CAAA;CAAE,GAAG,OAAO,CAEjG;AAmDD,wBAAgB,iCAAiC,CAC7C,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClC,QAAQ,EAAE,MAAM,EAAE,GACnB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAiBzB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,kBAAkB,EAA4B,MAAM,wBAAwB,CAAC;AAG3F,MAAM,WAAW,wBAAyB,SAAQ,kBAAkB;IAChE,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CACZ,MAAM,EACN;QACI,QAAQ,EAAE,MAAM,CAAC;QACjB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,OAAO,CAAC;KACrB,CACJ,CAAC;CACL;AAmBD,MAAM,MAAM,WAAW,GACjB,IAAI,GACJ,0BAA0B,GAC1B,uBAAuB,GACvB,iBAAiB,GACjB,sBAAsB,CAAC;AAE7B,MAAM,WAAW,kBAAkB;IAC/B,MAAM,EAAE,wBAAwB,GAAG;QAAE,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IACjE,WAAW,EAAE,WAAW,CAAC;IACzB,OAAO,EAAE;QACL,UAAU,EAAE,WAAW,CAAC;QACxB,aAAa,EAAE,WAAW,CAAC;KAC9B,CAAC;IACF,oBAAoB,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC9F,qBAAqB,EAAE,MAAM,EAAE,CAAC;CACnC;AAmWD,wBAAgB,gBAAgB,CAC5B,SAAS,EAAE,MAAM,GAClB,wBAAwB,GAAG;IAAE,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,CA2E1D;AAgDD,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,kBAAkB,CAuE9E"}
|
|
@@ -18,33 +18,33 @@ export declare const AgentOverrideConfigSchema: z.ZodObject<{
|
|
|
18
18
|
maxSteps: z.ZodOptional<z.ZodNumber>;
|
|
19
19
|
permission: z.ZodOptional<z.ZodObject<{
|
|
20
20
|
edit: z.ZodOptional<z.ZodEnum<{
|
|
21
|
-
ask: "ask";
|
|
22
|
-
allow: "allow";
|
|
23
21
|
deny: "deny";
|
|
22
|
+
allow: "allow";
|
|
23
|
+
ask: "ask";
|
|
24
24
|
}>>;
|
|
25
25
|
bash: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
26
|
-
ask: "ask";
|
|
27
|
-
allow: "allow";
|
|
28
26
|
deny: "deny";
|
|
29
|
-
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
30
|
-
ask: "ask";
|
|
31
27
|
allow: "allow";
|
|
28
|
+
ask: "ask";
|
|
29
|
+
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
32
30
|
deny: "deny";
|
|
31
|
+
allow: "allow";
|
|
32
|
+
ask: "ask";
|
|
33
33
|
}>>]>>;
|
|
34
34
|
webfetch: z.ZodOptional<z.ZodEnum<{
|
|
35
|
-
ask: "ask";
|
|
36
|
-
allow: "allow";
|
|
37
35
|
deny: "deny";
|
|
36
|
+
allow: "allow";
|
|
37
|
+
ask: "ask";
|
|
38
38
|
}>>;
|
|
39
39
|
doom_loop: z.ZodOptional<z.ZodEnum<{
|
|
40
|
-
ask: "ask";
|
|
41
|
-
allow: "allow";
|
|
42
40
|
deny: "deny";
|
|
41
|
+
allow: "allow";
|
|
42
|
+
ask: "ask";
|
|
43
43
|
}>>;
|
|
44
44
|
external_directory: z.ZodOptional<z.ZodEnum<{
|
|
45
|
-
ask: "ask";
|
|
46
|
-
allow: "allow";
|
|
47
45
|
deny: "deny";
|
|
46
|
+
allow: "allow";
|
|
47
|
+
ask: "ask";
|
|
48
48
|
}>>;
|
|
49
49
|
}, z.core.$strip>>;
|
|
50
50
|
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
@@ -58,39 +58,38 @@ export declare const DreamerConfigSchema: z.ZodObject<{
|
|
|
58
58
|
maxSteps: z.ZodOptional<z.ZodNumber>;
|
|
59
59
|
permission: z.ZodOptional<z.ZodObject<{
|
|
60
60
|
edit: z.ZodOptional<z.ZodEnum<{
|
|
61
|
-
ask: "ask";
|
|
62
|
-
allow: "allow";
|
|
63
61
|
deny: "deny";
|
|
62
|
+
allow: "allow";
|
|
63
|
+
ask: "ask";
|
|
64
64
|
}>>;
|
|
65
65
|
bash: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
66
|
-
ask: "ask";
|
|
67
|
-
allow: "allow";
|
|
68
66
|
deny: "deny";
|
|
69
|
-
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
70
|
-
ask: "ask";
|
|
71
67
|
allow: "allow";
|
|
68
|
+
ask: "ask";
|
|
69
|
+
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
72
70
|
deny: "deny";
|
|
71
|
+
allow: "allow";
|
|
72
|
+
ask: "ask";
|
|
73
73
|
}>>]>>;
|
|
74
74
|
webfetch: z.ZodOptional<z.ZodEnum<{
|
|
75
|
-
ask: "ask";
|
|
76
|
-
allow: "allow";
|
|
77
75
|
deny: "deny";
|
|
76
|
+
allow: "allow";
|
|
77
|
+
ask: "ask";
|
|
78
78
|
}>>;
|
|
79
79
|
doom_loop: z.ZodOptional<z.ZodEnum<{
|
|
80
|
-
ask: "ask";
|
|
81
|
-
allow: "allow";
|
|
82
80
|
deny: "deny";
|
|
81
|
+
allow: "allow";
|
|
82
|
+
ask: "ask";
|
|
83
83
|
}>>;
|
|
84
84
|
external_directory: z.ZodOptional<z.ZodEnum<{
|
|
85
|
-
ask: "ask";
|
|
86
|
-
allow: "allow";
|
|
87
85
|
deny: "deny";
|
|
86
|
+
allow: "allow";
|
|
87
|
+
ask: "ask";
|
|
88
88
|
}>>;
|
|
89
89
|
}, z.core.$strip>>;
|
|
90
90
|
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
91
91
|
variant: z.ZodOptional<z.ZodString>;
|
|
92
92
|
fallback_models: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
93
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
94
93
|
schedule: z.ZodDefault<z.ZodString>;
|
|
95
94
|
max_runtime_minutes: z.ZodDefault<z.ZodNumber>;
|
|
96
95
|
tasks: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
@@ -138,39 +137,38 @@ export declare const SidekickConfigSchema: z.ZodOptional<z.ZodObject<{
|
|
|
138
137
|
maxSteps: z.ZodOptional<z.ZodNumber>;
|
|
139
138
|
permission: z.ZodOptional<z.ZodObject<{
|
|
140
139
|
edit: z.ZodOptional<z.ZodEnum<{
|
|
141
|
-
ask: "ask";
|
|
142
|
-
allow: "allow";
|
|
143
140
|
deny: "deny";
|
|
141
|
+
allow: "allow";
|
|
142
|
+
ask: "ask";
|
|
144
143
|
}>>;
|
|
145
144
|
bash: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
146
|
-
ask: "ask";
|
|
147
|
-
allow: "allow";
|
|
148
145
|
deny: "deny";
|
|
149
|
-
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
150
|
-
ask: "ask";
|
|
151
146
|
allow: "allow";
|
|
147
|
+
ask: "ask";
|
|
148
|
+
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
152
149
|
deny: "deny";
|
|
150
|
+
allow: "allow";
|
|
151
|
+
ask: "ask";
|
|
153
152
|
}>>]>>;
|
|
154
153
|
webfetch: z.ZodOptional<z.ZodEnum<{
|
|
155
|
-
ask: "ask";
|
|
156
|
-
allow: "allow";
|
|
157
154
|
deny: "deny";
|
|
155
|
+
allow: "allow";
|
|
156
|
+
ask: "ask";
|
|
158
157
|
}>>;
|
|
159
158
|
doom_loop: z.ZodOptional<z.ZodEnum<{
|
|
160
|
-
ask: "ask";
|
|
161
|
-
allow: "allow";
|
|
162
159
|
deny: "deny";
|
|
160
|
+
allow: "allow";
|
|
161
|
+
ask: "ask";
|
|
163
162
|
}>>;
|
|
164
163
|
external_directory: z.ZodOptional<z.ZodEnum<{
|
|
165
|
-
ask: "ask";
|
|
166
|
-
allow: "allow";
|
|
167
164
|
deny: "deny";
|
|
165
|
+
allow: "allow";
|
|
166
|
+
ask: "ask";
|
|
168
167
|
}>>;
|
|
169
168
|
}, z.core.$strip>>;
|
|
170
169
|
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
171
170
|
variant: z.ZodOptional<z.ZodString>;
|
|
172
171
|
fallback_models: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
173
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
174
172
|
timeout_ms: z.ZodDefault<z.ZodNumber>;
|
|
175
173
|
system_prompt: z.ZodOptional<z.ZodString>;
|
|
176
174
|
thinking_level: z.ZodOptional<z.ZodEnum<{
|
|
@@ -205,33 +203,33 @@ export declare const HistorianConfigSchema: z.ZodOptional<z.ZodObject<{
|
|
|
205
203
|
maxSteps: z.ZodOptional<z.ZodNumber>;
|
|
206
204
|
permission: z.ZodOptional<z.ZodObject<{
|
|
207
205
|
edit: z.ZodOptional<z.ZodEnum<{
|
|
208
|
-
ask: "ask";
|
|
209
|
-
allow: "allow";
|
|
210
206
|
deny: "deny";
|
|
207
|
+
allow: "allow";
|
|
208
|
+
ask: "ask";
|
|
211
209
|
}>>;
|
|
212
210
|
bash: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
213
|
-
ask: "ask";
|
|
214
|
-
allow: "allow";
|
|
215
211
|
deny: "deny";
|
|
216
|
-
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
217
|
-
ask: "ask";
|
|
218
212
|
allow: "allow";
|
|
213
|
+
ask: "ask";
|
|
214
|
+
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
219
215
|
deny: "deny";
|
|
216
|
+
allow: "allow";
|
|
217
|
+
ask: "ask";
|
|
220
218
|
}>>]>>;
|
|
221
219
|
webfetch: z.ZodOptional<z.ZodEnum<{
|
|
222
|
-
ask: "ask";
|
|
223
|
-
allow: "allow";
|
|
224
220
|
deny: "deny";
|
|
221
|
+
allow: "allow";
|
|
222
|
+
ask: "ask";
|
|
225
223
|
}>>;
|
|
226
224
|
doom_loop: z.ZodOptional<z.ZodEnum<{
|
|
227
|
-
ask: "ask";
|
|
228
|
-
allow: "allow";
|
|
229
225
|
deny: "deny";
|
|
226
|
+
allow: "allow";
|
|
227
|
+
ask: "ask";
|
|
230
228
|
}>>;
|
|
231
229
|
external_directory: z.ZodOptional<z.ZodEnum<{
|
|
232
|
-
ask: "ask";
|
|
233
|
-
allow: "allow";
|
|
234
230
|
deny: "deny";
|
|
231
|
+
allow: "allow";
|
|
232
|
+
ask: "ask";
|
|
235
233
|
}>>;
|
|
236
234
|
}, z.core.$strip>>;
|
|
237
235
|
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
@@ -416,33 +414,33 @@ export declare const MagicContextConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
|
416
414
|
maxSteps: z.ZodOptional<z.ZodNumber>;
|
|
417
415
|
permission: z.ZodOptional<z.ZodObject<{
|
|
418
416
|
edit: z.ZodOptional<z.ZodEnum<{
|
|
419
|
-
ask: "ask";
|
|
420
|
-
allow: "allow";
|
|
421
417
|
deny: "deny";
|
|
418
|
+
allow: "allow";
|
|
419
|
+
ask: "ask";
|
|
422
420
|
}>>;
|
|
423
421
|
bash: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
424
|
-
ask: "ask";
|
|
425
|
-
allow: "allow";
|
|
426
422
|
deny: "deny";
|
|
427
|
-
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
428
|
-
ask: "ask";
|
|
429
423
|
allow: "allow";
|
|
424
|
+
ask: "ask";
|
|
425
|
+
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
430
426
|
deny: "deny";
|
|
427
|
+
allow: "allow";
|
|
428
|
+
ask: "ask";
|
|
431
429
|
}>>]>>;
|
|
432
430
|
webfetch: z.ZodOptional<z.ZodEnum<{
|
|
433
|
-
ask: "ask";
|
|
434
|
-
allow: "allow";
|
|
435
431
|
deny: "deny";
|
|
432
|
+
allow: "allow";
|
|
433
|
+
ask: "ask";
|
|
436
434
|
}>>;
|
|
437
435
|
doom_loop: z.ZodOptional<z.ZodEnum<{
|
|
438
|
-
ask: "ask";
|
|
439
|
-
allow: "allow";
|
|
440
436
|
deny: "deny";
|
|
437
|
+
allow: "allow";
|
|
438
|
+
ask: "ask";
|
|
441
439
|
}>>;
|
|
442
440
|
external_directory: z.ZodOptional<z.ZodEnum<{
|
|
443
|
-
ask: "ask";
|
|
444
|
-
allow: "allow";
|
|
445
441
|
deny: "deny";
|
|
442
|
+
allow: "allow";
|
|
443
|
+
ask: "ask";
|
|
446
444
|
}>>;
|
|
447
445
|
}, z.core.$strip>>;
|
|
448
446
|
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
@@ -475,39 +473,38 @@ export declare const MagicContextConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
|
475
473
|
maxSteps: z.ZodOptional<z.ZodNumber>;
|
|
476
474
|
permission: z.ZodOptional<z.ZodObject<{
|
|
477
475
|
edit: z.ZodOptional<z.ZodEnum<{
|
|
478
|
-
ask: "ask";
|
|
479
|
-
allow: "allow";
|
|
480
476
|
deny: "deny";
|
|
477
|
+
allow: "allow";
|
|
478
|
+
ask: "ask";
|
|
481
479
|
}>>;
|
|
482
480
|
bash: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
483
|
-
ask: "ask";
|
|
484
|
-
allow: "allow";
|
|
485
481
|
deny: "deny";
|
|
486
|
-
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
487
|
-
ask: "ask";
|
|
488
482
|
allow: "allow";
|
|
483
|
+
ask: "ask";
|
|
484
|
+
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
489
485
|
deny: "deny";
|
|
486
|
+
allow: "allow";
|
|
487
|
+
ask: "ask";
|
|
490
488
|
}>>]>>;
|
|
491
489
|
webfetch: z.ZodOptional<z.ZodEnum<{
|
|
492
|
-
ask: "ask";
|
|
493
|
-
allow: "allow";
|
|
494
490
|
deny: "deny";
|
|
491
|
+
allow: "allow";
|
|
492
|
+
ask: "ask";
|
|
495
493
|
}>>;
|
|
496
494
|
doom_loop: z.ZodOptional<z.ZodEnum<{
|
|
497
|
-
ask: "ask";
|
|
498
|
-
allow: "allow";
|
|
499
495
|
deny: "deny";
|
|
496
|
+
allow: "allow";
|
|
497
|
+
ask: "ask";
|
|
500
498
|
}>>;
|
|
501
499
|
external_directory: z.ZodOptional<z.ZodEnum<{
|
|
502
|
-
ask: "ask";
|
|
503
|
-
allow: "allow";
|
|
504
500
|
deny: "deny";
|
|
501
|
+
allow: "allow";
|
|
502
|
+
ask: "ask";
|
|
505
503
|
}>>;
|
|
506
504
|
}, z.core.$strip>>;
|
|
507
505
|
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
508
506
|
variant: z.ZodOptional<z.ZodString>;
|
|
509
507
|
fallback_models: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
510
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
511
508
|
schedule: z.ZodDefault<z.ZodString>;
|
|
512
509
|
max_runtime_minutes: z.ZodDefault<z.ZodNumber>;
|
|
513
510
|
tasks: z.ZodDefault<z.ZodArray<z.ZodEnum<{
|
|
@@ -636,39 +633,38 @@ export declare const MagicContextConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
|
636
633
|
maxSteps: z.ZodOptional<z.ZodNumber>;
|
|
637
634
|
permission: z.ZodOptional<z.ZodObject<{
|
|
638
635
|
edit: z.ZodOptional<z.ZodEnum<{
|
|
639
|
-
ask: "ask";
|
|
640
|
-
allow: "allow";
|
|
641
636
|
deny: "deny";
|
|
637
|
+
allow: "allow";
|
|
638
|
+
ask: "ask";
|
|
642
639
|
}>>;
|
|
643
640
|
bash: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
644
|
-
ask: "ask";
|
|
645
|
-
allow: "allow";
|
|
646
641
|
deny: "deny";
|
|
647
|
-
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
648
|
-
ask: "ask";
|
|
649
642
|
allow: "allow";
|
|
643
|
+
ask: "ask";
|
|
644
|
+
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
650
645
|
deny: "deny";
|
|
646
|
+
allow: "allow";
|
|
647
|
+
ask: "ask";
|
|
651
648
|
}>>]>>;
|
|
652
649
|
webfetch: z.ZodOptional<z.ZodEnum<{
|
|
653
|
-
ask: "ask";
|
|
654
|
-
allow: "allow";
|
|
655
650
|
deny: "deny";
|
|
651
|
+
allow: "allow";
|
|
652
|
+
ask: "ask";
|
|
656
653
|
}>>;
|
|
657
654
|
doom_loop: z.ZodOptional<z.ZodEnum<{
|
|
658
|
-
ask: "ask";
|
|
659
|
-
allow: "allow";
|
|
660
655
|
deny: "deny";
|
|
656
|
+
allow: "allow";
|
|
657
|
+
ask: "ask";
|
|
661
658
|
}>>;
|
|
662
659
|
external_directory: z.ZodOptional<z.ZodEnum<{
|
|
663
|
-
ask: "ask";
|
|
664
|
-
allow: "allow";
|
|
665
660
|
deny: "deny";
|
|
661
|
+
allow: "allow";
|
|
662
|
+
ask: "ask";
|
|
666
663
|
}>>;
|
|
667
664
|
}, z.core.$strip>>;
|
|
668
665
|
maxTokens: z.ZodOptional<z.ZodNumber>;
|
|
669
666
|
variant: z.ZodOptional<z.ZodString>;
|
|
670
667
|
fallback_models: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
671
|
-
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
672
668
|
timeout_ms: z.ZodDefault<z.ZodNumber>;
|
|
673
669
|
system_prompt: z.ZodOptional<z.ZodString>;
|
|
674
670
|
thinking_level: z.ZodOptional<z.ZodEnum<{
|
|
@@ -763,11 +759,11 @@ export declare const MagicContextConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
|
763
759
|
color?: string | undefined;
|
|
764
760
|
maxSteps?: number | undefined;
|
|
765
761
|
permission?: {
|
|
766
|
-
edit?: "
|
|
767
|
-
bash?: "
|
|
768
|
-
webfetch?: "
|
|
769
|
-
doom_loop?: "
|
|
770
|
-
external_directory?: "
|
|
762
|
+
edit?: "deny" | "allow" | "ask" | undefined;
|
|
763
|
+
bash?: "deny" | "allow" | "ask" | Record<string, "deny" | "allow" | "ask"> | undefined;
|
|
764
|
+
webfetch?: "deny" | "allow" | "ask" | undefined;
|
|
765
|
+
doom_loop?: "deny" | "allow" | "ask" | undefined;
|
|
766
|
+
external_directory?: "deny" | "allow" | "ask" | undefined;
|
|
771
767
|
} | undefined;
|
|
772
768
|
maxTokens?: number | undefined;
|
|
773
769
|
variant?: string | undefined;
|
|
@@ -775,7 +771,6 @@ export declare const MagicContextConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
|
775
771
|
thinking_level?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | undefined;
|
|
776
772
|
} | undefined;
|
|
777
773
|
dreamer?: {
|
|
778
|
-
enabled: boolean;
|
|
779
774
|
schedule: string;
|
|
780
775
|
max_runtime_minutes: number;
|
|
781
776
|
tasks: ("consolidate" | "verify" | "archive-stale" | "improve" | "maintain-docs")[];
|
|
@@ -801,11 +796,11 @@ export declare const MagicContextConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
|
801
796
|
color?: string | undefined;
|
|
802
797
|
maxSteps?: number | undefined;
|
|
803
798
|
permission?: {
|
|
804
|
-
edit?: "
|
|
805
|
-
bash?: "
|
|
806
|
-
webfetch?: "
|
|
807
|
-
doom_loop?: "
|
|
808
|
-
external_directory?: "
|
|
799
|
+
edit?: "deny" | "allow" | "ask" | undefined;
|
|
800
|
+
bash?: "deny" | "allow" | "ask" | Record<string, "deny" | "allow" | "ask"> | undefined;
|
|
801
|
+
webfetch?: "deny" | "allow" | "ask" | undefined;
|
|
802
|
+
doom_loop?: "deny" | "allow" | "ask" | undefined;
|
|
803
|
+
external_directory?: "deny" | "allow" | "ask" | undefined;
|
|
809
804
|
} | undefined;
|
|
810
805
|
maxTokens?: number | undefined;
|
|
811
806
|
variant?: string | undefined;
|
|
@@ -818,7 +813,6 @@ export declare const MagicContextConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
|
818
813
|
} | undefined;
|
|
819
814
|
protected_tags?: number | undefined;
|
|
820
815
|
sidekick?: {
|
|
821
|
-
enabled: boolean;
|
|
822
816
|
timeout_ms: number;
|
|
823
817
|
model?: string | undefined;
|
|
824
818
|
temperature?: number | undefined;
|
|
@@ -831,11 +825,11 @@ export declare const MagicContextConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
|
831
825
|
color?: string | undefined;
|
|
832
826
|
maxSteps?: number | undefined;
|
|
833
827
|
permission?: {
|
|
834
|
-
edit?: "
|
|
835
|
-
bash?: "
|
|
836
|
-
webfetch?: "
|
|
837
|
-
doom_loop?: "
|
|
838
|
-
external_directory?: "
|
|
828
|
+
edit?: "deny" | "allow" | "ask" | undefined;
|
|
829
|
+
bash?: "deny" | "allow" | "ask" | Record<string, "deny" | "allow" | "ask"> | undefined;
|
|
830
|
+
webfetch?: "deny" | "allow" | "ask" | undefined;
|
|
831
|
+
doom_loop?: "deny" | "allow" | "ask" | undefined;
|
|
832
|
+
external_directory?: "deny" | "allow" | "ask" | undefined;
|
|
839
833
|
} | undefined;
|
|
840
834
|
maxTokens?: number | undefined;
|
|
841
835
|
variant?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"magic-context.d.ts","sourceRoot":"","sources":["../../../src/config/schema/magic-context.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,6BAA6B,QAAS,CAAC;AACpD,eAAO,MAAM,oCAAoC,KAAK,CAAC;AACvD,eAAO,MAAM,4BAA4B,SAAU,CAAC;AACpD,eAAO,MAAM,iCAAiC,OAAO,CAAC;AACtD,eAAO,MAAM,6BAA6B,4BAA4B,CAAC;AACvE,0EAA0E;AAC1E,eAAO,MAAM,wCAAwC,OAAO,CAAC;AAC7D,eAAO,MAAM,kCAAkC,IAAI,CAAC;AACpD,eAAO,MAAM,8BAA8B,SAAU,CAAC;AACtD;8FAC8F;AAC9F,eAAO,MAAM,4CAA4C,KAAK,CAAC;AAC/D;;yFAEyF;AACzF,eAAO,MAAM,qCAAqC,KAAK,CAAC;AACxD;+EAC+E;AAC/E,eAAO,MAAM,+BAA+B,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAMlE,CAAC;AAEF,eAAO,MAAM,aAAa,iFAMhB,CAAC;AAEX,eAAO,MAAM,kBAAkB;;;;;;EAAwB,CAAC;AACxD,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAE9D,eAAO,MAAM,qBAAqB,EAAE,YAAY,EAK/C,CAAC;AAEF;;iEAEiE;AACjE,eAAO,MAAM,qBAAqB;;;;;;;GAEnB,CAAC;AAChB,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC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,OAAO,EAAE,OAAO,CAAC;YACjB,oEAAoE;YACpE,SAAS,EAAE,MAAM,CAAC;SACrB,CAAC;KACL,CAAC;IACF,SAAS,EAAE,eAAe,CAAC;IAC3B,MAAM,EAAE;QACJ,OAAO,EAAE,OAAO,CAAC;QACjB,uBAAuB,EAAE,MAAM,CAAC;QAChC,YAAY,EAAE,OAAO,CAAC;QACtB,mCAAmC,EAAE,MAAM,CAAC;KAC/C,CAAC;IACF,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC7B;AAED,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmO/B,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { Database } from "../../shared/sqlite";
|
|
2
|
+
export declare const COMPARTMENT_LEASE_TTL_MS: number;
|
|
3
|
+
export declare const COMPARTMENT_LEASE_RENEWAL_MS: number;
|
|
4
|
+
export interface LeaseAcquired {
|
|
5
|
+
sessionId: string;
|
|
6
|
+
holderId: string;
|
|
7
|
+
acquiredAt: number;
|
|
8
|
+
expiresAt: number;
|
|
9
|
+
}
|
|
10
|
+
export declare function acquireCompartmentLease(db: Database, sessionId: string, holderId: string): LeaseAcquired | null;
|
|
11
|
+
export declare function renewCompartmentLease(db: Database, sessionId: string, holderId: string): boolean;
|
|
12
|
+
export declare function releaseCompartmentLease(db: Database, sessionId: string, holderId: string): void;
|
|
13
|
+
export declare function isCompartmentLeaseHeld(db: Database, sessionId: string, holderId: string): boolean;
|
|
14
|
+
//# sourceMappingURL=compartment-lease.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"compartment-lease.d.ts","sourceRoot":"","sources":["../../../src/features/magic-context/compartment-lease.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAEpD,eAAO,MAAM,wBAAwB,QAAgB,CAAC;AACtD,eAAO,MAAM,4BAA4B,QAAY,CAAC;AAEtD,MAAM,WAAW,aAAa;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,uBAAuB,CACnC,EAAE,EAAE,QAAQ,EACZ,SAAS,EAAE,MAAM,EACjB,QAAQ,EAAE,MAAM,GACjB,aAAa,GAAG,IAAI,CAqBtB;AAED,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAWhG;AAED,wBAAgB,uBAAuB,CAAC,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,IAAI,CAK/F;AAED,wBAAgB,sBAAsB,CAAC,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAOjG"}
|