@netnodeag/kraftwerk 0.42.0 → 0.43.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.
- package/README.md +10 -9
- package/dist/cli/knowledge.js +3 -3
- package/dist/cli/kraftwerk.js +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.js +1 -1
- package/dist/inspector/channels.d.ts +3 -0
- package/dist/inspector/channels.js +12 -1
- package/dist/inspector/chat/sessions.js +54 -2
- package/dist/inspector/git.js +8 -5
- package/dist/inspector/instances.d.ts +5 -7
- package/dist/inspector/instances.js +14 -10
- package/dist/inspector/knowledge.d.ts +1 -1
- package/dist/inspector/knowledge.js +1 -1
- package/dist/inspector/search.d.ts +7 -5
- package/dist/inspector/search.js +5 -2
- package/dist/inspector/server.js +1 -1
- package/dist/okf.d.ts +1 -1
- package/dist/okf.js +1 -1
- package/inspector/dist/assets/{dist-DmP7Dxbp.js → dist-2tkXRwU5.js} +1 -1
- package/inspector/dist/assets/{dist-CE4xSQoL.js → dist-BX5KQfrx.js} +1 -1
- package/inspector/dist/assets/{dist-W68I5dk2.js → dist-BoDJE1PN.js} +1 -1
- package/inspector/dist/assets/{dist-DAeASF1A.js → dist-C-Yu0i8M.js} +1 -1
- package/inspector/dist/assets/{dist-5tG7aS9B.js → dist-Ck7zPi0Z.js} +1 -1
- package/inspector/dist/assets/{dist-CxiuM_jC.js → dist-CypKz49n.js} +1 -1
- package/inspector/dist/assets/{dist-DzY0J5Mz.js → dist-FHTVbzBi.js} +1 -1
- package/inspector/dist/assets/{dist-D8KGprRA.js → dist-LuoAT8wo.js} +1 -1
- package/inspector/dist/assets/{dist-C3XpBw6W.js → dist-NNs7Vtl3.js} +1 -1
- package/inspector/dist/assets/dist-Q3GFwcs6.js +1 -0
- package/inspector/dist/assets/{dist-CvxuLI-i.js → dist-Rc-i9obk.js} +1 -1
- package/inspector/dist/assets/{editor-CyEovn1g.js → editor-BI5xRg8C.js} +3 -3
- package/inspector/dist/assets/{index-B2d-nOUv.js → index-BUp72TiG.js} +4 -4
- package/inspector/dist/assets/index-h5Vh1ZaF.css +1 -0
- package/inspector/dist/index.html +2 -2
- package/package.json +1 -1
- package/inspector/dist/assets/dist-IEe8XFs2.js +0 -1
- package/inspector/dist/assets/index-BRw2ED9p.css +0 -1
package/README.md
CHANGED
|
@@ -148,7 +148,7 @@ kraftwerk list # table: workflows, steps, agents (with
|
|
|
148
148
|
kraftwerk run tagline "https://..." # run; --yes, --verbose
|
|
149
149
|
kraftwerk run # interactive: pick workflow, type the request
|
|
150
150
|
kraftwerk runs # past runs from output/*/trace.jsonl; runs show <id> for detail
|
|
151
|
-
kraftwerk knowledge #
|
|
151
|
+
kraftwerk knowledge # Knowledge: OKF bundles (list/get/put/verify/search/...)
|
|
152
152
|
kraftwerk ui # inspector web UI on http://localhost:1981; --port, --output
|
|
153
153
|
kraftwerk projects # every workspace on this machine; projects start|stop|forget <ref>
|
|
154
154
|
kraftwerk doctor # preflight: harness CLIs, docker, workflows, declared env vars
|
|
@@ -192,12 +192,13 @@ switcher:
|
|
|
192
192
|
icon: "🛰" # optional
|
|
193
193
|
```
|
|
194
194
|
|
|
195
|
-
**⌘K** (Ctrl K) anywhere in the inspector opens the
|
|
196
|
-
|
|
197
|
-
jump to it. It lists the active agents
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
current with its
|
|
195
|
+
**⌘K** (Ctrl K) anywhere in the inspector opens the palette: type a few
|
|
196
|
+
letters of an agent's or channel's name, description or workspace and hit
|
|
197
|
+
enter to jump to it. It lists the active agents and the channels of every
|
|
198
|
+
workspace on this machine, grouped by workspace and running or not (a
|
|
199
|
+
stopped one is started on the way), read from the project registry under
|
|
200
|
+
`~/.kraftwerk/projects`, which every inspector keeps current with its
|
|
201
|
+
roster and channel list.
|
|
201
202
|
|
|
202
203
|
### Triggering from CI, cron, or webhooks
|
|
203
204
|
|
|
@@ -460,7 +461,7 @@ browser. API: `GET/POST /api/channels`, `GET/PUT/DELETE /api/channels/:slug`,
|
|
|
460
461
|
`POST /api/channels/from-chat {chatId, name, members}`; messages go through
|
|
461
462
|
the chat endpoint with `from` for the poster's name.
|
|
462
463
|
|
|
463
|
-
##
|
|
464
|
+
## Knowledge
|
|
464
465
|
|
|
465
466
|
Alongside runs and chats, a project can keep curated knowledge as
|
|
466
467
|
[OKF v0.2](https://github.com/GoogleCloudPlatform/knowledge-catalog/blob/main/okf/SPEC.md)
|
|
@@ -503,7 +504,7 @@ trust tier per concept from that:
|
|
|
503
504
|
- Verified by a non-human actor means machine-confirmed.
|
|
504
505
|
- Verified by a `human:` actor means human-reviewed.
|
|
505
506
|
|
|
506
|
-
The inspector's
|
|
507
|
+
The inspector's Knowledge screen shows bundles, concepts with
|
|
507
508
|
trust, status and staleness badges, sources, and the bundle log. The verify
|
|
508
509
|
button records a `human:user` verification. "Curate in chat" opens a
|
|
509
510
|
knowledge-scoped chat whose agent knows the OKF essentials and writes through
|
package/dist/cli/knowledge.js
CHANGED
|
@@ -4,8 +4,8 @@ import chalk from "chalk";
|
|
|
4
4
|
import { resolveProject } from "../config.js";
|
|
5
5
|
import { fsck, getConcept, initBundle, knowledgeRoot, listBundles, listConcepts, searchKnowledge, validateBundle, verifyConcept, writeConcept, } from "../okf.js";
|
|
6
6
|
/**
|
|
7
|
-
* `kraftwerk knowledge` — the CLI surface over OKF bundles (
|
|
8
|
-
* Knowledge). This is the enforced write path: `put` stamps provenance
|
|
7
|
+
* `kraftwerk knowledge` — the CLI surface over OKF bundles (the
|
|
8
|
+
* inspector's Knowledge screen). This is the enforced write path: `put` stamps provenance
|
|
9
9
|
* (`generated: { by, at }`), appends the bundle log, and regenerates
|
|
10
10
|
* index.md; direct file edits are healed by `fsck --fix`.
|
|
11
11
|
*
|
|
@@ -59,7 +59,7 @@ async function readStdin() {
|
|
|
59
59
|
export function registerKnowledgeCommands(program) {
|
|
60
60
|
const knowledge = program
|
|
61
61
|
.command("knowledge")
|
|
62
|
-
.description("
|
|
62
|
+
.description("Knowledge: OKF bundles under knowledge/ (read, write, verify)");
|
|
63
63
|
knowledge
|
|
64
64
|
.command("list", { isDefault: true })
|
|
65
65
|
.description("List bundles, or the concepts of one bundle")
|
package/dist/cli/kraftwerk.js
CHANGED
|
@@ -25,7 +25,7 @@ import { runUi } from "./ui.js";
|
|
|
25
25
|
* kraftwerk list discover + list workflows (--json, --from)
|
|
26
26
|
* kraftwerk run [workflow] [text] run one (prompts interactively if omitted)
|
|
27
27
|
* kraftwerk runs [show <id>] inspect past runs from their traces
|
|
28
|
-
* kraftwerk knowledge ...
|
|
28
|
+
* kraftwerk knowledge ... Knowledge: OKF bundles (list/get/put/verify/...)
|
|
29
29
|
* kraftwerk routines ... per-agent scheduled prompts (list/add/remove/enable/run)
|
|
30
30
|
* kraftwerk ui start the inspector web UI (localhost:1981)
|
|
31
31
|
* kraftwerk projects ... known projects on this machine (list/start/forget)
|
package/dist/config.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ export declare const CONFIG_FILENAMES: string[];
|
|
|
39
39
|
/**
|
|
40
40
|
* Git sync for the workspace. The synced paths are not configurable: they
|
|
41
41
|
* are the roots this file already declares (workflows, knowledge, agents,
|
|
42
|
-
* skills)
|
|
42
|
+
* skills), channels/, README.md and kraftwerk.yml itself. Commit and push stay manual; the
|
|
43
43
|
* interval only fetches, and pulls when `autosync` allows it.
|
|
44
44
|
*/
|
|
45
45
|
/**
|
package/dist/config.js
CHANGED
|
@@ -44,7 +44,7 @@ const WORKFLOW_ROOT_CANDIDATES = ["src/workflows", "workflows"];
|
|
|
44
44
|
/**
|
|
45
45
|
* Git sync for the workspace. The synced paths are not configurable: they
|
|
46
46
|
* are the roots this file already declares (workflows, knowledge, agents,
|
|
47
|
-
* skills)
|
|
47
|
+
* skills), channels/, README.md and kraftwerk.yml itself. Commit and push stay manual; the
|
|
48
48
|
* interval only fetches, and pulls when `autosync` allows it.
|
|
49
49
|
*/
|
|
50
50
|
/**
|
|
@@ -23,6 +23,9 @@ export interface Channel {
|
|
|
23
23
|
/** Agent-to-agent handovers allowed per human message. */
|
|
24
24
|
maxHops: number;
|
|
25
25
|
}
|
|
26
|
+
/** What the ⌘K palette needs of a channel (and what the project registry records). */
|
|
27
|
+
export type ChannelSummary = Pick<Channel, "slug" | "name" | "purpose">;
|
|
28
|
+
export declare const toChannelSummary: (c: Channel) => ChannelSummary;
|
|
26
29
|
export declare const DEFAULT_MAX_HOPS = 3;
|
|
27
30
|
export declare function channelsRoot(): Promise<string>;
|
|
28
31
|
export declare function safeChannelSlug(slug: string): string;
|
|
@@ -4,6 +4,12 @@ import { parse, stringify } from "yaml";
|
|
|
4
4
|
import { getProjectRoot } from "./context.js";
|
|
5
5
|
import { resolveProject } from "../config.js";
|
|
6
6
|
import { listAgents, safeAgentSlug, slugFromName } from "./agents.js";
|
|
7
|
+
import { syncProjectChannels } from "./instances.js";
|
|
8
|
+
export const toChannelSummary = (c) => ({
|
|
9
|
+
slug: c.slug,
|
|
10
|
+
name: c.name,
|
|
11
|
+
...(c.purpose ? { purpose: c.purpose } : {}),
|
|
12
|
+
});
|
|
7
13
|
export const DEFAULT_MAX_HOPS = 3;
|
|
8
14
|
const SLUG_RE = /^[a-z0-9][a-z0-9-]{0,48}$/;
|
|
9
15
|
export async function channelsRoot() {
|
|
@@ -40,7 +46,12 @@ export async function listChannels() {
|
|
|
40
46
|
return [];
|
|
41
47
|
}
|
|
42
48
|
const channels = await Promise.all(entries.map((slug) => getChannel(slug)));
|
|
43
|
-
|
|
49
|
+
const list = channels.filter(Boolean).sort((a, b) => a.name.localeCompare(b.name));
|
|
50
|
+
// Like the agent roster: the registry copy feeds other instances' palettes.
|
|
51
|
+
await resolveProject(getProjectRoot())
|
|
52
|
+
.then((p) => syncProjectChannels(p.root, list.map(toChannelSummary)))
|
|
53
|
+
.catch(() => { });
|
|
54
|
+
return list;
|
|
44
55
|
}
|
|
45
56
|
export async function getChannel(slug) {
|
|
46
57
|
const file = path.join(await channelsRoot(), safeChannelSlug(slug), "channel.yml");
|
|
@@ -121,7 +121,59 @@ async function loadState(id) {
|
|
|
121
121
|
writeChain: Promise.resolve(),
|
|
122
122
|
};
|
|
123
123
|
// Two racing loads: keep whichever registered first.
|
|
124
|
-
|
|
124
|
+
const registered = states.get(id) ?? (states.set(id, state), state);
|
|
125
|
+
if (registered === state)
|
|
126
|
+
closeInterruptedWork(state);
|
|
127
|
+
return registered;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* A chat loaded from disk has no live process: whatever the transcript
|
|
131
|
+
* still shows as in flight died with the previous inspector (restart,
|
|
132
|
+
* relaunch after an update, crash). Left alone, the UI keeps rendering a
|
|
133
|
+
* permission card nobody can answer any more and a "working" lamp that
|
|
134
|
+
* never goes out. Close those out once, in the transcript itself, so
|
|
135
|
+
* every reader sees the same settled thread: dropped permission requests
|
|
136
|
+
* resolve to "dismissed", open turns end with an error that says why.
|
|
137
|
+
*/
|
|
138
|
+
function closeInterruptedWork(state) {
|
|
139
|
+
const pending = new Map();
|
|
140
|
+
const open = new Map();
|
|
141
|
+
const key = (a) => (a?.kind === "agent" ? `agent:${a.slug}` : "main");
|
|
142
|
+
for (const e of state.events) {
|
|
143
|
+
switch (e.type) {
|
|
144
|
+
case "permission_request":
|
|
145
|
+
pending.set(e.requestId, e.from);
|
|
146
|
+
break;
|
|
147
|
+
case "permission_resolved":
|
|
148
|
+
pending.delete(e.requestId);
|
|
149
|
+
break;
|
|
150
|
+
// Channels: a turn is bracketed by turn_start/turn_end per agent.
|
|
151
|
+
// Ordinary chats never emit turn_start: the user's message opens the
|
|
152
|
+
// turn, turn_end/error closes it.
|
|
153
|
+
case "user_message":
|
|
154
|
+
if (state.meta.scope.kind !== "channel")
|
|
155
|
+
open.set("main", undefined);
|
|
156
|
+
break;
|
|
157
|
+
case "turn_start":
|
|
158
|
+
open.set(key(e.from), e.from);
|
|
159
|
+
break;
|
|
160
|
+
case "turn_end":
|
|
161
|
+
case "error":
|
|
162
|
+
open.delete(key(e.from));
|
|
163
|
+
break;
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
for (const [requestId, from] of pending) {
|
|
167
|
+
emit(state, { type: "permission_resolved", requestId, optionId: null }, from);
|
|
168
|
+
void dismissKey(`approval:${state.meta.id}:${requestId}`);
|
|
169
|
+
}
|
|
170
|
+
for (const from of open.values()) {
|
|
171
|
+
const who = from?.kind === "agent" ? `@${from.slug}` : "the agent";
|
|
172
|
+
const how = state.meta.scope.kind === "channel" ? `mention ${who} again` : "send another message";
|
|
173
|
+
emit(state, { type: "error", message: `${who} was interrupted by an inspector restart — ${how} to continue` }, from);
|
|
174
|
+
}
|
|
175
|
+
if (pending.size || open.size)
|
|
176
|
+
void writeMeta(state.meta).catch(() => { });
|
|
125
177
|
}
|
|
126
178
|
function emit(state, ev, from) {
|
|
127
179
|
const stored = {
|
|
@@ -333,7 +385,7 @@ async function baseScopeContext(scope, agent) {
|
|
|
333
385
|
const bundleLines = bundles
|
|
334
386
|
.map((b) => `- ${b.name} (${b.concepts} concepts${b.updatedAt ? `, updated ${b.updatedAt.slice(0, 10)}` : ""})`)
|
|
335
387
|
.join("\n");
|
|
336
|
-
return (`You are the knowledge curator inside the kraftwerk inspector ("
|
|
388
|
+
return (`You are the knowledge curator inside the kraftwerk inspector ("Knowledge"). ` +
|
|
337
389
|
`This project keeps knowledge as OKF v0.2 bundles (Open Knowledge Format): directories of markdown ` +
|
|
338
390
|
`files with YAML frontmatter under ${root || "knowledge/"}. Each direct subdirectory is one bundle; each .md file ` +
|
|
339
391
|
`(except the reserved index.md and log.md) is one concept.\n\n` +
|
package/dist/inspector/git.js
CHANGED
|
@@ -6,8 +6,8 @@ import { ENV_FILE } from "../runner/docker.js";
|
|
|
6
6
|
import { getOutputDir, getProjectRoot } from "./context.js";
|
|
7
7
|
/**
|
|
8
8
|
* Workspace git sync. Several people run kraftwerk against one git repo, so
|
|
9
|
-
* knowledge, agents, skills and workflows travel between them like
|
|
10
|
-
* tracked file. The inspector shows what changed, lets a human pick files and
|
|
9
|
+
* knowledge, agents, skills, channels and workflows travel between them like
|
|
10
|
+
* any other tracked file. The inspector shows what changed, lets a human pick files and
|
|
11
11
|
* commit them, and pushes on request.
|
|
12
12
|
*
|
|
13
13
|
* Deliberate limits, because this runs git on someone's repo from a web UI
|
|
@@ -203,9 +203,9 @@ async function checkedOut(repo) {
|
|
|
203
203
|
}
|
|
204
204
|
/**
|
|
205
205
|
* The roots that may be committed, as repo-relative paths: the workflows,
|
|
206
|
-
* knowledge, agents, skills and vibeables roots this project
|
|
207
|
-
* kraftwerk.yml. The output directory
|
|
208
|
-
* one of them.
|
|
206
|
+
* knowledge, agents, skills, channels and vibeables roots this project
|
|
207
|
+
* declares, plus kraftwerk.yml and the project README. The output directory
|
|
208
|
+
* is excluded even when it lives inside one of them.
|
|
209
209
|
*/
|
|
210
210
|
function scopeFor({ project, repoRoot }) {
|
|
211
211
|
// rev-parse reports the repo root with symlinks resolved; the project root
|
|
@@ -230,9 +230,12 @@ function scopeFor({ project, repoRoot }) {
|
|
|
230
230
|
path.resolve(project.root, project.config.knowledge ?? "knowledge"),
|
|
231
231
|
path.resolve(project.root, project.config.agents ?? "agents"),
|
|
232
232
|
path.resolve(project.root, project.config.skills ?? "skills"),
|
|
233
|
+
// Channels have no configurable root: channels/ under the project.
|
|
234
|
+
path.resolve(project.root, "channels"),
|
|
233
235
|
// Vibeables are the workspace's own apps: versioned with it, unlike clones.
|
|
234
236
|
vibeablesRootFor(project),
|
|
235
237
|
project.configPath,
|
|
238
|
+
path.resolve(project.root, "README.md"),
|
|
236
239
|
];
|
|
237
240
|
const mapped = roots.filter((r) => !!r).map(rel).filter((r) => !!r);
|
|
238
241
|
// Clones under the repos root are other people's history, never this
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { AgentSummary } from "./agents.js";
|
|
2
|
+
import type { ChannelSummary } from "./channels.js";
|
|
2
3
|
/** Durable per-project record. The root is the key; everything else derives from it. */
|
|
3
4
|
export interface ProjectRecord {
|
|
4
5
|
root: string;
|
|
@@ -9,6 +10,8 @@ export interface ProjectRecord {
|
|
|
9
10
|
startCount: number;
|
|
10
11
|
/** Active agents, as last seen by the instance serving this root. */
|
|
11
12
|
agents?: AgentSummary[];
|
|
13
|
+
/** Channels, as last seen by the instance serving this root. */
|
|
14
|
+
channels?: ChannelSummary[];
|
|
12
15
|
}
|
|
13
16
|
/** A verified running instance, shaped like a switcher entry. */
|
|
14
17
|
export interface DiscoveredInstance {
|
|
@@ -58,13 +61,8 @@ export declare function unregisterInstance(): void;
|
|
|
58
61
|
export declare function discoverInstances(): Promise<DiscoveredInstance[]>;
|
|
59
62
|
/** Upsert the project record for a root (call on every inspector start). */
|
|
60
63
|
export declare function registerProject(root: string): Promise<void>;
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
* (the UI polls it, routines tick it), so a record only changes when the
|
|
64
|
-
* roster did. Roots with no record (a CLI run in a project that never
|
|
65
|
-
* started the inspector) are left alone.
|
|
66
|
-
*/
|
|
67
|
-
export declare function syncProjectAgents(root: string, agents: AgentSummary[]): Promise<void>;
|
|
64
|
+
export declare const syncProjectAgents: (root: string, agents: AgentSummary[]) => Promise<void>;
|
|
65
|
+
export declare const syncProjectChannels: (root: string, channels: ChannelSummary[]) => Promise<void>;
|
|
68
66
|
/** Stamp lastStopped on clean shutdown. Sync so exit handlers can call it. */
|
|
69
67
|
export declare function markProjectStopped(): void;
|
|
70
68
|
/** All known projects, most recently started first. */
|
|
@@ -145,6 +145,7 @@ async function readProject(file) {
|
|
|
145
145
|
lastStopped: rec.lastStopped,
|
|
146
146
|
startCount: rec.startCount ?? 1,
|
|
147
147
|
...(Array.isArray(rec.agents) ? { agents: rec.agents } : {}),
|
|
148
|
+
...(Array.isArray(rec.channels) ? { channels: rec.channels } : {}),
|
|
148
149
|
};
|
|
149
150
|
}
|
|
150
151
|
catch {
|
|
@@ -164,32 +165,35 @@ export async function registerProject(root) {
|
|
|
164
165
|
lastStarted: now,
|
|
165
166
|
startCount: (prev?.startCount ?? 0) + 1,
|
|
166
167
|
...(prev?.agents ? { agents: prev.agents } : {}),
|
|
168
|
+
...(prev?.channels ? { channels: prev.channels } : {}),
|
|
167
169
|
};
|
|
168
170
|
await fs.writeFile(projectFile(abs), JSON.stringify(rec, null, 2));
|
|
169
171
|
}
|
|
170
172
|
catch { } // best-effort, like the instance file
|
|
171
173
|
}
|
|
172
|
-
|
|
174
|
+
const synced = new Map();
|
|
173
175
|
/**
|
|
174
|
-
* Write the roster into the project's record. Called
|
|
175
|
-
* (the UI polls it, routines tick it), so a record only
|
|
176
|
-
*
|
|
177
|
-
* started the inspector) are left alone.
|
|
176
|
+
* Write the roster (or the channel list) into the project's record. Called
|
|
177
|
+
* on every read (the UI polls it, routines tick it), so a record only
|
|
178
|
+
* changes when the list did. Roots with no record (a CLI run in a project
|
|
179
|
+
* that never started the inspector) are left alone.
|
|
178
180
|
*/
|
|
179
|
-
|
|
180
|
-
const
|
|
181
|
-
if (key ===
|
|
181
|
+
async function syncProjectList(root, key, list) {
|
|
182
|
+
const stamp = `${root}\n${JSON.stringify(list)}`;
|
|
183
|
+
if (synced.get(key) === stamp)
|
|
182
184
|
return;
|
|
183
185
|
try {
|
|
184
186
|
const file = projectFile(root);
|
|
185
187
|
const rec = await readProject(file);
|
|
186
188
|
if (!rec)
|
|
187
189
|
return;
|
|
188
|
-
await fs.writeFile(file, JSON.stringify({ ...rec,
|
|
189
|
-
|
|
190
|
+
await fs.writeFile(file, JSON.stringify({ ...rec, [key]: list }, null, 2));
|
|
191
|
+
synced.set(key, stamp);
|
|
190
192
|
}
|
|
191
193
|
catch { }
|
|
192
194
|
}
|
|
195
|
+
export const syncProjectAgents = (root, agents) => syncProjectList(root, "agents", agents);
|
|
196
|
+
export const syncProjectChannels = (root, channels) => syncProjectList(root, "channels", channels);
|
|
193
197
|
/** Stamp lastStopped on clean shutdown. Sync so exit handlers can call it. */
|
|
194
198
|
export function markProjectStopped() {
|
|
195
199
|
if (!selfRoot)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type BundleInfo, type ConceptDetail, type ConceptInfo } from "../okf.js";
|
|
2
2
|
/**
|
|
3
|
-
*
|
|
3
|
+
* Knowledge for the inspector: a thin API layer over the OKF
|
|
4
4
|
* core (src/okf.ts). Writes from the UI are stamped as `human:user` — the
|
|
5
5
|
* browser user is the human in the loop; agents write through the CLI (or
|
|
6
6
|
* chat) with their own actor.
|
|
@@ -4,7 +4,7 @@ import { resolveProject } from "../config.js";
|
|
|
4
4
|
import { getConcept, initBundle, knowledgeRoot, listBundles, listConcepts, safeBundleName, verifyConcept, writeConcept, } from "../okf.js";
|
|
5
5
|
import { getProjectRoot } from "./context.js";
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Knowledge for the inspector: a thin API layer over the OKF
|
|
8
8
|
* core (src/okf.ts). Writes from the UI are stamped as `human:user` — the
|
|
9
9
|
* browser user is the human in the loop; agents write through the CLI (or
|
|
10
10
|
* chat) with their own actor.
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import { type AgentSummary } from "./agents.js";
|
|
2
|
+
import { type ChannelSummary } from "./channels.js";
|
|
2
3
|
/**
|
|
3
|
-
* The ⌘K palette: every active agent in every workspace
|
|
4
|
-
* knows, so a user can jump to one without switching
|
|
5
|
-
* This instance reads its own
|
|
6
|
-
* project registry, where each instance records
|
|
7
|
-
*
|
|
4
|
+
* The ⌘K palette: every active agent and every channel in every workspace
|
|
5
|
+
* this machine knows, so a user can jump to one without switching
|
|
6
|
+
* workspaces first. This instance reads its own lists from disk; the others
|
|
7
|
+
* come from the project registry, where each instance records them
|
|
8
|
+
* whenever it reads them (see instances.ts). Stopped workspaces are listed too — the
|
|
8
9
|
* palette starts them on the way to the agent.
|
|
9
10
|
*/
|
|
10
11
|
export interface WorkspaceAgents {
|
|
@@ -18,6 +19,7 @@ export interface WorkspaceAgents {
|
|
|
18
19
|
current: boolean;
|
|
19
20
|
live: boolean;
|
|
20
21
|
agents: AgentSummary[];
|
|
22
|
+
channels: ChannelSummary[];
|
|
21
23
|
}
|
|
22
24
|
export interface AgentSearch {
|
|
23
25
|
workspaces: WorkspaceAgents[];
|
package/dist/inspector/search.js
CHANGED
|
@@ -2,6 +2,7 @@ import path from "node:path";
|
|
|
2
2
|
import { resolveProject } from "../config.js";
|
|
3
3
|
import { getProjectRoot } from "./context.js";
|
|
4
4
|
import { listAgents, toSummary } from "./agents.js";
|
|
5
|
+
import { listChannels, toChannelSummary } from "./channels.js";
|
|
5
6
|
import { currentInstanceUrl, discoverWorkspaces, listProjects } from "./instances.js";
|
|
6
7
|
export async function searchAgents() {
|
|
7
8
|
const project = await resolveProject(getProjectRoot()).catch(() => null);
|
|
@@ -13,9 +14,10 @@ export async function searchAgents() {
|
|
|
13
14
|
current: true,
|
|
14
15
|
live: true,
|
|
15
16
|
agents: (await listAgents().catch(() => [])).filter((a) => !a.archived).map(toSummary),
|
|
17
|
+
channels: (await listChannels().catch(() => [])).map(toChannelSummary),
|
|
16
18
|
};
|
|
17
19
|
const [workspaces, projects] = await Promise.all([discoverWorkspaces(), listProjects()]);
|
|
18
|
-
const
|
|
20
|
+
const records = new Map(projects.map((p) => [p.root, p]));
|
|
19
21
|
const others = workspaces
|
|
20
22
|
.filter((w) => w.root && w.exists !== false)
|
|
21
23
|
.map((w) => ({
|
|
@@ -25,7 +27,8 @@ export async function searchAgents() {
|
|
|
25
27
|
root: w.root,
|
|
26
28
|
current: false,
|
|
27
29
|
live: w.live,
|
|
28
|
-
agents:
|
|
30
|
+
agents: records.get(w.root)?.agents ?? [],
|
|
31
|
+
channels: records.get(w.root)?.channels ?? [],
|
|
29
32
|
}));
|
|
30
33
|
return { workspaces: [self, ...others] };
|
|
31
34
|
}
|
package/dist/inspector/server.js
CHANGED
|
@@ -472,7 +472,7 @@ async function handleApi(req, res, url) {
|
|
|
472
472
|
return json(res, { error: err.message }, 400);
|
|
473
473
|
}
|
|
474
474
|
}
|
|
475
|
-
// GET /api/search/agents — active agents of every reachable workspace (the ⌘K palette)
|
|
475
|
+
// GET /api/search/agents — active agents and channels of every reachable workspace (the ⌘K palette)
|
|
476
476
|
if (seg.length === 3 && seg[1] === "search" && seg[2] === "agents" && method === "GET") {
|
|
477
477
|
return json(res, await searchAgents());
|
|
478
478
|
}
|
package/dist/okf.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* OKF (Open Knowledge Format) core — kraftwerk's "
|
|
2
|
+
* OKF (Open Knowledge Format) core — kraftwerk's "Knowledge"
|
|
3
3
|
* feature. Implements OKF v0.2 (github.com/GoogleCloudPlatform/knowledge-catalog):
|
|
4
4
|
* a knowledge bundle is a directory of markdown files with YAML frontmatter,
|
|
5
5
|
* one concept per file, plus the reserved index.md / log.md.
|
package/dist/okf.js
CHANGED
|
@@ -2,7 +2,7 @@ import { promises as fs } from "node:fs";
|
|
|
2
2
|
import path from "node:path";
|
|
3
3
|
import { parse as parseYaml, parseDocument } from "yaml";
|
|
4
4
|
/**
|
|
5
|
-
* OKF (Open Knowledge Format) core — kraftwerk's "
|
|
5
|
+
* OKF (Open Knowledge Format) core — kraftwerk's "Knowledge"
|
|
6
6
|
* feature. Implements OKF v0.2 (github.com/GoogleCloudPlatform/knowledge-catalog):
|
|
7
7
|
* a knowledge bundle is a directory of markdown files with YAML frontmatter,
|
|
8
8
|
* one concept per file, plus the reserved index.md / log.md.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{C as e,D as t,F as n,L as r,R as i,Ut as a,V as o,n as s,r as c,s as l,u,v as d,vt as f}from"./dist-H3rerbMg.js";import{n as p}from"./dist-DAeASF1A.js";var m=1,h=2,g=3,_=180,v=4,y=181,b=5,x=182,S=6;function C(e){return e>=65&&e<=90||e>=97&&e<=122}var w=new s(e=>{let t=e.pos;for(;;){let{next:n}=e;if(n<0)break;if(n==123){let n=e.peek(1);if(n==123){if(e.pos>t)break;e.acceptToken(m,2);return}if(n==37){if(e.pos>t)break;let n=2,r=2;for(;;){let t=e.peek(n);if(t==32||t==10)++n;else if(t==35)for(++n;;){let t=e.peek(n);if(t<0||t==10)break;n++}else if(t==45&&r==2)r=++n;else{let i=t==101&&e.peek(n+1)==110&&e.peek(n+2)==100;e.acceptToken(i?g:h,r);return}}}}if(e.advance(),n==10)break}e.pos>t&&e.acceptToken(_)});function T(e,t,n){return new s(r=>{let i=r.pos;for(;;){let{next:t}=r;if(t==123&&r.peek(1)==37){let t=2;for(;;t++){let e=r.peek(t);if(e!=32&&e!=10)break}let a=``;for(;;t++){let e=r.peek(t);if(!C(e))break;a+=String.fromCharCode(e)}if(a==e){if(r.pos>i)break;r.acceptToken(n,2);break}}else if(t<0)break;if(r.advance(),t==10)break}r.pos>i&&r.acceptToken(t)})}var E=T(`endcomment`,x,b),D=T(`endraw`,y,v),O=new s(e=>{if(e.next==35){for(e.advance();!(e.next==10||e.next<0||(e.next==37||e.next==125)&&e.peek(1)==125);)e.advance();e.acceptToken(S)}}),k={__proto__:null,contains:34,or:38,and:38,true:52,false:52,empty:54,forloop:57,tablerowloop:59,continue:61,in:131,with:197,for:199,as:201,if:237,endif:241,unless:247,endunless:251,elsif:255,else:259,case:265,endcase:269,when:273,endfor:281,tablerow:287,endtablerow:291,break:295,cycle:301,echo:305,render:309,include:313,assign:317,capture:323,endcapture:327,increment:331,decrement:335},A={__proto__:null,if:86,endif:90,elsif:94,else:98,unless:104,endunless:108,case:114,endcase:118,when:122,for:128,endfor:138,tablerow:144,endtablerow:148,break:152,continue:156,cycle:160,comment:166,endcomment:172,raw:178,endraw:184,echo:188,render:192,include:204,assign:208,capture:214,endcapture:218,increment:222,decrement:226,liquid:230},j=c.deserialize({version:14,states:"KtQYOPOOOOOP'#F{'#F{OeOaO'#CdOsQhO'#CfO!bQxO'#DSO#{OPO'#DVO$ZOPO'#D`O$iOPO'#DeO$wOPO'#DlO%VOPO'#DtO%eOSO'#EPO%jOQO'#EVO%oOPO'#EiOOOP'#Ge'#GeOOOP'#G]'#G]OOOP'#F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R's'Pm$]!Q#d#g#n#r#u$V$^%q%v%|&S&X&cm#c!Q#d#g#n#r#u$V$^%q%v%|&S&X&cT%o#d%qm#f!Q#d#g#n#r#u$V$^%q%v%|&S&X&cT%t#g%vm#i!Q#d#g#n#r#u$V$^%q%v%|&S&X&cm#k!Q#d#g#n#r#u$V$^%q%v%|&S&X&cm#m!Q#d#g#n#r#u$V$^%q%v%|&S&X&cT%z#n%|m#p!Q#d#g#n#r#u$V$^%q%v%|&S&X&cT&Q#r&Sm#t!Q#d#g#n#r#u$V$^%q%v%|&S&X&cT&V#u&Xm#w!Q#d#g#n#r#u$V$^%q%v%|&S&X&cm#z!Q#d#g#n#r#u$V$^%q%v%|&S&X&cm#|!Q#d#g#n#r#u$V$^%q%v%|&S&X&cm$O!Q#d#g#n#r#u$V$^%q%v%|&S&X&cm$Q!Q#d#g#n#r#u$V$^%q%v%|&S&X&cm$S!Q#d#g#n#r#u$V$^%q%v%|&S&X&cm$U!Q#d#g#n#r#u$V$^%q%v%|&S&X&cT&a$V&cm$X!Q#d#g#n#r#u$V$^%q%v%|&S&X&cm$Z!Q#d#g#n#r#u$V$^%q%v%|&S&X&c",nodeNames:`⚠ {{ {% {% {% {% InlineComment Template Text }} Interpolation VariableName MemberExpression . PropertyName SubscriptExpression BinaryExpression contains CompareOp LogicOp AssignmentExpression AssignOp ) ( RangeExpression .. BooleanLiteral empty forloop tablerowloop continue StringLiteral NumberLiteral Filter | FilterName : , Tag TagName %} IfDirective Tag if EndTag endif Tag elsif Tag else UnlessDirective Tag unless EndTag endunless CaseDirective Tag case EndTag endcase Tag when ForDirective Tag for in Parameter ParameterName EndTag endfor TableDirective Tag tablerow EndTag endtablerow Tag break Tag continue Tag cycle Comment Tag comment CommentText EndTag endcomment RawDirective Tag raw RawText EndTag endraw Tag echo Tag render RenderParameter with for as Tag include Tag assign CaptureDirective Tag capture EndTag endcapture Tag increment Tag decrement Tag liquid IfDirective Tag if EndTag endif UnlessDirective Tag unless EndTag endunless Tag elsif Tag else CaseDirective Tag case EndTag endcase Tag when ForDirective Tag EndTag endfor TableDirective Tag tablerow EndTag endtablerow Tag break Tag Tag cycle Tag echo Tag render Tag include Tag assign CaptureDirective Tag capture EndTag endcapture Tag increment Tag decrement`,maxTerm:220,nodeProps:[[`closedBy`,1,`}}`,-4,2,3,4,5,`%}`,23,`)`],[`openedBy`,9,`{{`,22,`(`,40,`{%`],[`group`,-13,11,12,15,16,20,24,26,27,28,29,30,31,32,`Expression`]],skippedNodes:[0,6],repeatNodeCount:11,tokenData:")e~RmXY!|YZ!|]^!|pq!|qr#_rs#juv$[wx$gxy%Syz%X{|%^|}&x}!O&}!O!P'Z!Q![&g![!]'k!^!_'p!_!`'x!`!a'p!c!}(Q!}#O(y#P#Q)O#R#S(Q#T#o(Q#p#q)T#q#r)Y%W;'S(Q;'S;:j(s<%lO(Q~#RS%O~XY!|YZ!|]^!|pq!|~#bP!_!`#e~#jOb~~#mUOY#jZr#jrs$Ps;'S#j;'S;=`$U<%lO#j~$UOo~~$XP;=`<%l#j~$_P#q#r$b~$gOx~~$jUOY$gZw$gwx$Px;'S$g;'S;=`$|<%lO$g~%PP;=`<%l$g~%XOg~~%^Of~P%aQ!O!P%g!Q![&gP%jP!Q![%mP%rRpP!Q![%m!g!h%{#X#Y%{P&OR{|&X}!O&X!Q![&_P&[P!Q![&_P&dPpP!Q![&_P&lSpP!O!P%g!Q![&g!g!h%{#X#Y%{~&}Ou~~'QRuv$[!O!P%g!Q![&g~'`Q]S!O!P'f!Q![%m~'kOi~~'pOt~~'uPb~!_!`#e~'}Pe~!_!`#e_(ZW^WwQ%RT}!O(Q!Q![(Q!c!}(Q#R#S(Q#T#o(Q%W;'S(Q;'S;:j(s<%lO(Q_(vP;=`<%l(Q~)OO%T~~)TO%S~~)YOr~~)]P#q#r)`~)eOX~",tokenizers:[w,D,E,O,0,1,2,3],topRules:{Template:[0,7]},dynamicPrecedences:{190:1,191:1,192:1,194:1,195:1,196:1,197:1,199:1,200:1,201:1,202:1,203:1,204:1,205:1,206:1,207:1,208:1,209:1,210:1,211:1,212:1,213:1,214:1,215:1,216:1,217:1,218:1,219:1,220:1},specialized:[{term:187,get:e=>k[e]||-1},{term:39,get:e=>A[e]||-1}],tokenPrec:0});function M(e,t){return e.split(` `).map(e=>({label:e,type:t}))}var N=M(`abs append at_least at_most capitalize ceil compact concat date default divided_by downcase escape escape_once first floor join last lstrip map minus modulo newline_to_br plus prepend remove remove_first replace replace_first reverse round rstrip size slice sort sort_natural split strip strip_html strip_newlines sum times truncate truncatewords uniq upcase url_decode url_encode where`,`function`),P=M(`cycle comment endcomment raw endraw echo increment decrement liquid if elsif else endif unless endunless case endcase for endfor tablerow endtablerow break continue assign capture endcapture render include`,`keyword`),F=M(`empty forloop tablerowloop in with as`,`keyword`),I=M(`first index index0 last length rindex`,`property`),L=M(`col col0 col_first col_last first index index0 last length rindex rindex0 row`,`property`);function R(e){let{state:t,pos:r}=e,i=n(t).resolveInner(r,-1).enterUnfinishedNodesBefore(r),a=i.childBefore(r)?.name||i.name;if(i.name==`FilterName`)return{type:`filter`,node:i};if(e.explicit&&a==`|`)return{type:`filter`};if(i.name==`TagName`)return{type:`tag`,node:i};if(e.explicit&&a==`{%`)return{type:`tag`};if(i.name==`PropertyName`&&i.parent.name==`MemberExpression`)return{type:`property`,node:i,target:i.parent};if(i.name==`.`&&i.parent.name==`MemberExpression`)return{type:`property`,target:i.parent};if(i.name==`MemberExpression`&&a==`.`)return{type:`property`,target:i};if(i.name==`VariableName`)return{type:`expression`,from:i.from};let o=e.matchBefore(/[\w\u00c0-\uffff]+$/);return o?{type:`expression`,from:o.from}:e.explicit&&i.name!=`CommentText`&&i.name!=`StringLiteral`&&i.name!=`NumberLiteral`&&i.name!=`InlineComment`?{type:`expression`}:null}function z(e,t,n,r){let i=[];for(;;){let n=t.getChild(`Expression`);if(!n)return[];if(n.name==`VariableName`||n.name==`forloop`||n.name==`tablerowloop`){let t=e.sliceDoc(n.from,n.to);if(t==`forloop`)return i.length?[]:I;if(t==`tablerowloop`)return i.length?[]:L;i.unshift(t);break}if(n.name==`MemberExpression`){let r=n.getChild(`PropertyName`);r&&i.unshift(e.sliceDoc(r.from,r.to)),t=n}else if(n.name==`SubscriptExpression`){let r=n.getChildren(`Expression`)[1];i.unshift(r?.name==`StringLiteral`?e.sliceDoc(r.from+1,r.to-1):`[]`),t=n}else return[]}return r?r(i,e,n):[]}function B(e={}){let t=e.filters?e.filters.concat(N):N,n=e.tags?e.tags.concat(P):P,r=e.variables?e.variables.concat(F):F,{properties:i}=e;return e=>{let a=R(e);if(!a)return null;let o=a.from??(a.node?a.node.from:e.pos),s;return s=a.type==`filter`?t:a.type==`tag`?n:a.type==`expression`?r:z(e.state,a.target,e,i),s.length?{options:s,from:o,validFor:/^[\w\u00c0-\uffff]*$/}:null}}var V=o.inputHandler.of((e,t,n,r)=>r!=`%`||t!=n||e.state.doc.sliceString(t-1,n+1)!=`{}`?!1:(e.dispatch(e.state.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:`%%`},range:f.cursor(e.from+1)})),{scrollIntoView:!0,userEvent:`input.type`}),!0));function H(e){return t=>{let n=e.test(t.textAfter);return t.lineIndent(t.node.from)+(n?0:t.unit)}}var U=l.define({name:`liquid`,parser:j.configure({props:[r({"cycle comment endcomment raw endraw echo increment decrement liquid in with as":i.keyword,"empty forloop tablerowloop":i.atom,"if elsif else endif unless endunless case endcase for endfor tablerow endtablerow break continue":i.controlKeyword,"assign capture endcapture":i.definitionKeyword,contains:i.operatorKeyword,"render include":i.moduleKeyword,VariableName:i.variableName,TagName:i.tagName,FilterName:i.function(i.variableName),PropertyName:i.propertyName,CompareOp:i.compareOperator,AssignOp:i.definitionOperator,LogicOp:i.logicOperator,NumberLiteral:i.number,StringLiteral:i.string,BooleanLiteral:i.bool,InlineComment:i.lineComment,CommentText:i.blockComment,"{% %} {{ }}":i.brace,"[ ]":i.bracket,"( )":i.paren,".":i.derefOperator,", .. : |":i.punctuation}),t.add({Tag:d({closing:`%}`}),"UnlessDirective ForDirective TablerowDirective CaptureDirective":H(/^\s*(\{%-?\s*)?end\w/),IfDirective:H(/^\s*(\{%-?\s*)?(endif|else|elsif)\b/),CaseDirective:H(/^\s*(\{%-?\s*)?(endcase|when)\b/)}),e.add({"UnlessDirective ForDirective TablerowDirective CaptureDirective IfDirective CaseDirective RawDirective Comment"(e){let t=e.firstChild,n=e.lastChild;return!t||t.name!=`Tag`?null:{from:t.to,to:n.name==`EndTag`?n.from:e.to}}})]}),languageData:{commentTokens:{line:`#`},indentOnInput:/^\s*{%-?\s*(?:end|elsif|else|when|)$/}}),W=p();function G(e){return U.configure({wrap:a(t=>t.type.isTop?{parser:e.parser,overlay:e=>e.name==`Text`||e.name==`RawText`}:null)},`liquid`)}var K=G(W.language);function q(e={}){let t=e.base||W,n=t.language==W.language?K:G(t.language);return new u(n,[t.support,n.data.of({autocomplete:B(e)}),t.language.data.of({closeBrackets:{brackets:[`{`]}}),V])}export{q as liquid};
|
|
1
|
+
import{C as e,D as t,F as n,L as r,R as i,Ut as a,V as o,n as s,r as c,s as l,u,v as d,vt as f}from"./dist-H3rerbMg.js";import{n as p}from"./dist-C-Yu0i8M.js";var m=1,h=2,g=3,_=180,v=4,y=181,b=5,x=182,S=6;function C(e){return e>=65&&e<=90||e>=97&&e<=122}var w=new s(e=>{let t=e.pos;for(;;){let{next:n}=e;if(n<0)break;if(n==123){let n=e.peek(1);if(n==123){if(e.pos>t)break;e.acceptToken(m,2);return}if(n==37){if(e.pos>t)break;let n=2,r=2;for(;;){let t=e.peek(n);if(t==32||t==10)++n;else if(t==35)for(++n;;){let t=e.peek(n);if(t<0||t==10)break;n++}else if(t==45&&r==2)r=++n;else{let i=t==101&&e.peek(n+1)==110&&e.peek(n+2)==100;e.acceptToken(i?g:h,r);return}}}}if(e.advance(),n==10)break}e.pos>t&&e.acceptToken(_)});function T(e,t,n){return new s(r=>{let i=r.pos;for(;;){let{next:t}=r;if(t==123&&r.peek(1)==37){let t=2;for(;;t++){let e=r.peek(t);if(e!=32&&e!=10)break}let a=``;for(;;t++){let e=r.peek(t);if(!C(e))break;a+=String.fromCharCode(e)}if(a==e){if(r.pos>i)break;r.acceptToken(n,2);break}}else if(t<0)break;if(r.advance(),t==10)break}r.pos>i&&r.acceptToken(t)})}var E=T(`endcomment`,x,b),D=T(`endraw`,y,v),O=new s(e=>{if(e.next==35){for(e.advance();!(e.next==10||e.next<0||(e.next==37||e.next==125)&&e.peek(1)==125);)e.advance();e.acceptToken(S)}}),k={__proto__:null,contains:34,or:38,and:38,true:52,false:52,empty:54,forloop:57,tablerowloop:59,continue:61,in:131,with:197,for:199,as:201,if:237,endif:241,unless:247,endunless:251,elsif:255,else:259,case:265,endcase:269,when:273,endfor:281,tablerow:287,endtablerow:291,break:295,cycle:301,echo:305,render:309,include:313,assign:317,capture:323,endcapture:327,increment:331,decrement:335},A={__proto__:null,if:86,endif:90,elsif:94,else:98,unless:104,endunless:108,case:114,endcase:118,when:122,for:128,endfor:138,tablerow:144,endtablerow:148,break:152,continue:156,cycle:160,comment:166,endcomment:172,raw:178,endraw:184,echo:188,render:192,include:204,assign:208,capture:214,endcapture:218,increment:222,decrement:226,liquid:230},j=c.deserialize({version:14,states:"KtQYOPOOOOOP'#F{'#F{OeOaO'#CdOsQhO'#CfO!bQxO'#DSO#{OPO'#DVO$ZOPO'#D`O$iOPO'#DeO$wOPO'#DlO%VOPO'#DtO%eOSO'#EPO%jOQO'#EVO%oOPO'#EiOOOP'#Ge'#GeOOOP'#G]'#G]OOOP'#Fz'#FzQYOPOOOOOP-E9y-E9yOOQW'#Cg'#CgO&cQ!jO,59QO&jQ!jO'#G^OsQhO'#CtOOQW'#Gb'#GbOOQW'#Gc'#GcOOQW'#Gd'#GdOOQW'#G^'#G^OOOP,59n,59nO)YQhO,59nOsQhO,59rOsQhO,59vO)dQhO,59xOsQhO,59{OsQhO,5:QOsQhO,5:UO!]QhO,5:XO!]QhO,5:aO)iQhO,5:eO)nQhO,5:gO)s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#u$V$^%q%v%|&S&X&cT&Q#r&Sm#t!Q#d#g#n#r#u$V$^%q%v%|&S&X&cT&V#u&Xm#w!Q#d#g#n#r#u$V$^%q%v%|&S&X&cm#z!Q#d#g#n#r#u$V$^%q%v%|&S&X&cm#|!Q#d#g#n#r#u$V$^%q%v%|&S&X&cm$O!Q#d#g#n#r#u$V$^%q%v%|&S&X&cm$Q!Q#d#g#n#r#u$V$^%q%v%|&S&X&cm$S!Q#d#g#n#r#u$V$^%q%v%|&S&X&cm$U!Q#d#g#n#r#u$V$^%q%v%|&S&X&cT&a$V&cm$X!Q#d#g#n#r#u$V$^%q%v%|&S&X&cm$Z!Q#d#g#n#r#u$V$^%q%v%|&S&X&c",nodeNames:`⚠ {{ {% {% {% {% InlineComment Template Text }} Interpolation VariableName MemberExpression . PropertyName SubscriptExpression BinaryExpression contains CompareOp LogicOp AssignmentExpression AssignOp ) ( RangeExpression .. BooleanLiteral empty forloop tablerowloop continue StringLiteral NumberLiteral Filter | FilterName : , Tag TagName %} IfDirective Tag if EndTag endif Tag elsif Tag else UnlessDirective Tag unless EndTag endunless CaseDirective Tag case EndTag endcase Tag when ForDirective Tag for in Parameter ParameterName EndTag endfor TableDirective Tag tablerow EndTag endtablerow Tag break Tag continue Tag cycle Comment Tag comment CommentText EndTag endcomment RawDirective Tag raw RawText EndTag endraw Tag echo Tag render RenderParameter with for as Tag include Tag assign CaptureDirective Tag capture EndTag endcapture Tag increment Tag decrement Tag liquid IfDirective Tag if EndTag endif UnlessDirective Tag unless EndTag endunless Tag elsif Tag else CaseDirective Tag case EndTag endcase Tag when ForDirective Tag EndTag endfor TableDirective Tag tablerow EndTag endtablerow Tag break Tag Tag cycle Tag echo Tag render Tag include Tag assign CaptureDirective Tag capture EndTag endcapture Tag increment Tag decrement`,maxTerm:220,nodeProps:[[`closedBy`,1,`}}`,-4,2,3,4,5,`%}`,23,`)`],[`openedBy`,9,`{{`,22,`(`,40,`{%`],[`group`,-13,11,12,15,16,20,24,26,27,28,29,30,31,32,`Expression`]],skippedNodes:[0,6],repeatNodeCount:11,tokenData:")e~RmXY!|YZ!|]^!|pq!|qr#_rs#juv$[wx$gxy%Syz%X{|%^|}&x}!O&}!O!P'Z!Q![&g![!]'k!^!_'p!_!`'x!`!a'p!c!}(Q!}#O(y#P#Q)O#R#S(Q#T#o(Q#p#q)T#q#r)Y%W;'S(Q;'S;:j(s<%lO(Q~#RS%O~XY!|YZ!|]^!|pq!|~#bP!_!`#e~#jOb~~#mUOY#jZr#jrs$Ps;'S#j;'S;=`$U<%lO#j~$UOo~~$XP;=`<%l#j~$_P#q#r$b~$gOx~~$jUOY$gZw$gwx$Px;'S$g;'S;=`$|<%lO$g~%PP;=`<%l$g~%XOg~~%^Of~P%aQ!O!P%g!Q![&gP%jP!Q![%mP%rRpP!Q![%m!g!h%{#X#Y%{P&OR{|&X}!O&X!Q![&_P&[P!Q![&_P&dPpP!Q![&_P&lSpP!O!P%g!Q![&g!g!h%{#X#Y%{~&}Ou~~'QRuv$[!O!P%g!Q![&g~'`Q]S!O!P'f!Q![%m~'kOi~~'pOt~~'uPb~!_!`#e~'}Pe~!_!`#e_(ZW^WwQ%RT}!O(Q!Q![(Q!c!}(Q#R#S(Q#T#o(Q%W;'S(Q;'S;:j(s<%lO(Q_(vP;=`<%l(Q~)OO%T~~)TO%S~~)YOr~~)]P#q#r)`~)eOX~",tokenizers:[w,D,E,O,0,1,2,3],topRules:{Template:[0,7]},dynamicPrecedences:{190:1,191:1,192:1,194:1,195:1,196:1,197:1,199:1,200:1,201:1,202:1,203:1,204:1,205:1,206:1,207:1,208:1,209:1,210:1,211:1,212:1,213:1,214:1,215:1,216:1,217:1,218:1,219:1,220:1},specialized:[{term:187,get:e=>k[e]||-1},{term:39,get:e=>A[e]||-1}],tokenPrec:0});function M(e,t){return e.split(` `).map(e=>({label:e,type:t}))}var N=M(`abs append at_least at_most capitalize ceil compact concat date default divided_by downcase escape escape_once first floor join last lstrip map minus modulo newline_to_br plus prepend remove remove_first replace replace_first reverse round rstrip size slice sort sort_natural split strip strip_html strip_newlines sum times truncate truncatewords uniq upcase url_decode url_encode where`,`function`),P=M(`cycle comment endcomment raw endraw echo increment decrement liquid if elsif else endif unless endunless case endcase for endfor tablerow endtablerow break continue assign capture endcapture render include`,`keyword`),F=M(`empty forloop tablerowloop in with as`,`keyword`),I=M(`first index index0 last length rindex`,`property`),L=M(`col col0 col_first col_last first index index0 last length rindex rindex0 row`,`property`);function R(e){let{state:t,pos:r}=e,i=n(t).resolveInner(r,-1).enterUnfinishedNodesBefore(r),a=i.childBefore(r)?.name||i.name;if(i.name==`FilterName`)return{type:`filter`,node:i};if(e.explicit&&a==`|`)return{type:`filter`};if(i.name==`TagName`)return{type:`tag`,node:i};if(e.explicit&&a==`{%`)return{type:`tag`};if(i.name==`PropertyName`&&i.parent.name==`MemberExpression`)return{type:`property`,node:i,target:i.parent};if(i.name==`.`&&i.parent.name==`MemberExpression`)return{type:`property`,target:i.parent};if(i.name==`MemberExpression`&&a==`.`)return{type:`property`,target:i};if(i.name==`VariableName`)return{type:`expression`,from:i.from};let o=e.matchBefore(/[\w\u00c0-\uffff]+$/);return o?{type:`expression`,from:o.from}:e.explicit&&i.name!=`CommentText`&&i.name!=`StringLiteral`&&i.name!=`NumberLiteral`&&i.name!=`InlineComment`?{type:`expression`}:null}function z(e,t,n,r){let i=[];for(;;){let n=t.getChild(`Expression`);if(!n)return[];if(n.name==`VariableName`||n.name==`forloop`||n.name==`tablerowloop`){let t=e.sliceDoc(n.from,n.to);if(t==`forloop`)return i.length?[]:I;if(t==`tablerowloop`)return i.length?[]:L;i.unshift(t);break}if(n.name==`MemberExpression`){let r=n.getChild(`PropertyName`);r&&i.unshift(e.sliceDoc(r.from,r.to)),t=n}else if(n.name==`SubscriptExpression`){let r=n.getChildren(`Expression`)[1];i.unshift(r?.name==`StringLiteral`?e.sliceDoc(r.from+1,r.to-1):`[]`),t=n}else return[]}return r?r(i,e,n):[]}function B(e={}){let t=e.filters?e.filters.concat(N):N,n=e.tags?e.tags.concat(P):P,r=e.variables?e.variables.concat(F):F,{properties:i}=e;return e=>{let a=R(e);if(!a)return null;let o=a.from??(a.node?a.node.from:e.pos),s;return s=a.type==`filter`?t:a.type==`tag`?n:a.type==`expression`?r:z(e.state,a.target,e,i),s.length?{options:s,from:o,validFor:/^[\w\u00c0-\uffff]*$/}:null}}var V=o.inputHandler.of((e,t,n,r)=>r!=`%`||t!=n||e.state.doc.sliceString(t-1,n+1)!=`{}`?!1:(e.dispatch(e.state.changeByRange(e=>({changes:{from:e.from,to:e.to,insert:`%%`},range:f.cursor(e.from+1)})),{scrollIntoView:!0,userEvent:`input.type`}),!0));function H(e){return t=>{let n=e.test(t.textAfter);return t.lineIndent(t.node.from)+(n?0:t.unit)}}var U=l.define({name:`liquid`,parser:j.configure({props:[r({"cycle comment endcomment raw endraw echo increment decrement liquid in with as":i.keyword,"empty forloop tablerowloop":i.atom,"if elsif else endif unless endunless case endcase for endfor tablerow endtablerow break continue":i.controlKeyword,"assign capture endcapture":i.definitionKeyword,contains:i.operatorKeyword,"render include":i.moduleKeyword,VariableName:i.variableName,TagName:i.tagName,FilterName:i.function(i.variableName),PropertyName:i.propertyName,CompareOp:i.compareOperator,AssignOp:i.definitionOperator,LogicOp:i.logicOperator,NumberLiteral:i.number,StringLiteral:i.string,BooleanLiteral:i.bool,InlineComment:i.lineComment,CommentText:i.blockComment,"{% %} {{ }}":i.brace,"[ ]":i.bracket,"( )":i.paren,".":i.derefOperator,", .. : |":i.punctuation}),t.add({Tag:d({closing:`%}`}),"UnlessDirective ForDirective TablerowDirective CaptureDirective":H(/^\s*(\{%-?\s*)?end\w/),IfDirective:H(/^\s*(\{%-?\s*)?(endif|else|elsif)\b/),CaseDirective:H(/^\s*(\{%-?\s*)?(endcase|when)\b/)}),e.add({"UnlessDirective ForDirective TablerowDirective CaptureDirective IfDirective CaseDirective RawDirective Comment"(e){let t=e.firstChild,n=e.lastChild;return!t||t.name!=`Tag`?null:{from:t.to,to:n.name==`EndTag`?n.from:e.to}}})]}),languageData:{commentTokens:{line:`#`},indentOnInput:/^\s*{%-?\s*(?:end|elsif|else|when|)$/}}),W=p();function G(e){return U.configure({wrap:a(t=>t.type.isTop?{parser:e.parser,overlay:e=>e.name==`Text`||e.name==`RawText`}:null)},`liquid`)}var K=G(W.language);function q(e={}){let t=e.base||W,n=t.language==W.language?K:G(t.language);return new u(n,[t.support,n.data.of({autocomplete:B(e)}),t.language.data.of({closeBrackets:{brackets:[`{`]}}),V])}export{q as liquid};
|