leglas 0.3.0 → 0.4.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.
@@ -6,8 +6,8 @@
6
6
  <meta name="robots" content="noindex" />
7
7
  <link rel="icon" href="/leglas/favicon.svg" type="image/svg+xml" />
8
8
  <title>Leglas</title>
9
- <script type="module" crossorigin src="/leglas/assets/index-Bl87Vq9G.js"></script>
10
- <link rel="stylesheet" crossorigin href="/leglas/assets/index-dMGYwlE1.css">
9
+ <script type="module" crossorigin src="/leglas/assets/index-T-uR7kT7.js"></script>
10
+ <link rel="stylesheet" crossorigin href="/leglas/assets/index-BQHDjn0q.css">
11
11
  </head>
12
12
  <body>
13
13
  <div id="root"></div>
package/dist/watch.d.ts CHANGED
@@ -1,45 +1,2 @@
1
- import type { PendingRequest } from "@leglas/server";
2
- /** Where the agent command is remembered, beside the other machine-local state. */
3
- export declare const WATCH_PATH = ".leglas/watch.json";
4
- /** The one thing the template must contain, and the only thing substituted. */
5
- export declare const PROMPT_TOKEN = "{prompt}";
6
- export type WatchTemplate = {
7
- command: string;
8
- /** Still holds the placeholder; commandFor substitutes per request. */
9
- args: readonly string[];
10
- };
11
- export type TemplateResult = {
12
- ok: true;
13
- template: WatchTemplate;
14
- } | {
15
- ok: false;
16
- error: string;
17
- };
18
- /**
19
- * Validate an agent command before anything is spawned or remembered.
20
- *
21
- * Every refusal is one line naming the fix, because this is the first thing a
22
- * user types and the failure is always the same shape: the placeholder is
23
- * missing, or it is glued to something else. Substituting a placeholder that
24
- * is part of a larger token would build an argument the agent never asked for,
25
- * so that case is refused rather than guessed at.
26
- */
27
- export declare function parseTemplate(raw: string): TemplateResult;
28
- /**
29
- * The argv for one request. The prompt is a single entry however many words,
30
- * lines or quotes it contains, which is the whole reason the template names a
31
- * placeholder instead of being pasted together as a string.
32
- */
33
- export declare function commandFor(template: WatchTemplate, prompt: string): {
34
- command: string;
35
- args: string[];
36
- };
37
- /**
38
- * The request to hand over next, or nothing to do.
39
- *
40
- * Queue order, one at a time: two agents editing one tree at once produce a
41
- * conflict the user has to untangle. Ids that already failed are skipped for
42
- * the life of the process, since a prompt that broke the agent will break it
43
- * again and retrying it is the user's tokens on fire.
44
- */
45
- export declare function nextRequest(requests: readonly PendingRequest[], failed: ReadonlySet<string>): PendingRequest | null;
1
+ export { PROMPT_TOKEN, WATCH_PATH, commandFor, nextRequest, parseTemplate, tokenize, } from "@leglas/server";
2
+ export type { TemplateResult, WatchTemplate } from "@leglas/server";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "leglas",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "Compare design directions inside your own running app.",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -28,8 +28,8 @@
28
28
  "types": "./dist/index.d.ts",
29
29
  "devDependencies": {
30
30
  "tsup": "^8.5.0",
31
- "@leglas/server": "0.0.0",
32
- "@leglas/shell": "0.0.0"
31
+ "@leglas/shell": "0.0.0",
32
+ "@leglas/server": "0.0.0"
33
33
  },
34
34
  "engines": {
35
35
  "node": ">=24"