@yaks/cli 0.0.0-stage → 0.2.36
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/LICENSE +202 -0
- package/README.md +1059 -2
- package/_dist/account-forward.d.ts +12 -0
- package/_dist/account-forward.d.ts.map +1 -0
- package/_dist/accounts.d.ts +23 -0
- package/_dist/accounts.d.ts.map +1 -0
- package/_dist/answer.d.ts +88 -0
- package/_dist/answer.d.ts.map +1 -0
- package/_dist/apply.d.ts +17 -0
- package/_dist/apply.d.ts.map +1 -0
- package/_dist/args.d.ts +86 -0
- package/_dist/args.d.ts.map +1 -0
- package/_dist/commands.d.ts +15 -0
- package/_dist/commands.d.ts.map +1 -0
- package/_dist/complete.d.ts +15 -0
- package/_dist/complete.d.ts.map +1 -0
- package/_dist/config.d.ts +37 -0
- package/_dist/config.d.ts.map +1 -0
- package/_dist/dependencies.d.ts +6 -0
- package/_dist/dependencies.d.ts.map +1 -0
- package/_dist/facets.d.ts +71 -0
- package/_dist/facets.d.ts.map +1 -0
- package/_dist/grammar.d.ts +5 -0
- package/_dist/grammar.d.ts.map +1 -0
- package/_dist/host.d.ts +164 -0
- package/_dist/host.d.ts.map +1 -0
- package/_dist/install.d.ts +43 -0
- package/_dist/install.d.ts.map +1 -0
- package/_dist/main.d.ts +16 -0
- package/_dist/main.d.ts.map +1 -0
- package/_dist/memo.d.ts +60 -0
- package/_dist/memo.d.ts.map +1 -0
- package/_dist/mod.d.ts +46 -0
- package/_dist/mod.d.ts.map +1 -0
- package/_dist/page.d.ts +73 -0
- package/_dist/page.d.ts.map +1 -0
- package/_dist/platform.d.ts +27 -0
- package/_dist/platform.d.ts.map +1 -0
- package/_dist/reader.d.ts +10 -0
- package/_dist/reader.d.ts.map +1 -0
- package/_dist/release.d.ts +48 -0
- package/_dist/release.d.ts.map +1 -0
- package/_dist/remote.d.ts +13 -0
- package/_dist/remote.d.ts.map +1 -0
- package/_dist/reported.d.ts +11 -0
- package/_dist/reported.d.ts.map +1 -0
- package/_dist/roles.d.ts +2 -0
- package/_dist/roles.d.ts.map +1 -0
- package/_dist/roster.d.ts +41 -0
- package/_dist/roster.d.ts.map +1 -0
- package/_dist/rpc.d.ts +29 -0
- package/_dist/rpc.d.ts.map +1 -0
- package/_dist/run.d.ts +164 -0
- package/_dist/run.d.ts.map +1 -0
- package/_dist/runtime.d.ts +4 -0
- package/_dist/runtime.d.ts.map +1 -0
- package/_dist/searching.d.ts +7 -0
- package/_dist/searching.d.ts.map +1 -0
- package/_dist/show.d.ts +22 -0
- package/_dist/show.d.ts.map +1 -0
- package/_dist/store.d.ts +25 -0
- package/_dist/store.d.ts.map +1 -0
- package/_dist/terminal.d.ts +17 -0
- package/_dist/terminal.d.ts.map +1 -0
- package/_dist/tool.d.ts +55 -0
- package/_dist/tool.d.ts.map +1 -0
- package/_dist/tty.d.ts +3 -0
- package/_dist/tty.d.ts.map +1 -0
- package/_dist/vault.d.ts +9 -0
- package/_dist/vault.d.ts.map +1 -0
- package/_dist/words.d.ts +11 -0
- package/_dist/words.d.ts.map +1 -0
- package/_dist/yak.d.ts +10 -0
- package/_dist/yak.d.ts.map +1 -0
- package/account-forward.js +40 -0
- package/account-forward.js.map +1 -0
- package/account-forward.ts +50 -0
- package/accounts.js +162 -0
- package/accounts.js.map +1 -0
- package/accounts.ts +228 -0
- package/answer.js +394 -0
- package/answer.js.map +1 -0
- package/answer.ts +569 -0
- package/apply.js +49 -0
- package/apply.js.map +1 -0
- package/apply.ts +54 -0
- package/args.js +420 -0
- package/args.js.map +1 -0
- package/args.ts +494 -0
- package/code.js +209 -0
- package/code.js.map +1 -0
- package/code.ts +227 -0
- package/commands.js +131 -0
- package/commands.js.map +1 -0
- package/commands.ts +142 -0
- package/complete.js +104 -0
- package/complete.js.map +1 -0
- package/complete.ts +152 -0
- package/config.js +125 -0
- package/config.js.map +1 -0
- package/config.ts +180 -0
- package/declarations.js +67 -0
- package/declarations.js.map +1 -0
- package/declarations.ts +84 -0
- package/deno.json +1 -0
- package/dependencies.js +126 -0
- package/dependencies.js.map +1 -0
- package/dependencies.ts +141 -0
- package/derive.js +102 -0
- package/derive.js.map +1 -0
- package/derive.ts +125 -0
- package/drain.js +83 -0
- package/drain.js.map +1 -0
- package/drain.ts +115 -0
- package/duties.ts +17 -0
- package/exports.json +1486 -0
- package/external.js +373 -0
- package/external.js.map +1 -0
- package/external.ts +435 -0
- package/facets.js +214 -0
- package/facets.js.map +1 -0
- package/facets.ts +232 -0
- package/feedback.js +54 -0
- package/feedback.js.map +1 -0
- package/feedback.ts +57 -0
- package/files.js +84 -0
- package/files.js.map +1 -0
- package/files.ts +112 -0
- package/get_starts.js +31 -0
- package/get_starts.js.map +1 -0
- package/get_starts.ts +34 -0
- package/git-credential.js +79 -0
- package/git-credential.js.map +1 -0
- package/git-credential.ts +77 -0
- package/grammar.js +4 -0
- package/grammar.js.map +1 -0
- package/grammar.ts +5 -0
- package/held.js +51 -0
- package/held.js.map +1 -0
- package/held.ts +66 -0
- package/host.js +1174 -0
- package/host.js.map +1 -0
- package/host.ts +1343 -0
- package/init.js +138 -0
- package/init.js.map +1 -0
- package/init.ts +139 -0
- package/install.js +216 -0
- package/install.js.map +1 -0
- package/install.ts +223 -0
- package/lifetime.js +56 -0
- package/lifetime.js.map +1 -0
- package/lifetime.ts +66 -0
- package/local-page.ts +114 -0
- package/local.js +417 -0
- package/local.js.map +1 -0
- package/local.ts +537 -0
- package/lockfile.js +20 -0
- package/lockfile.js.map +1 -0
- package/lockfile.ts +32 -0
- package/machines.js +33 -0
- package/machines.js.map +1 -0
- package/machines.ts +51 -0
- package/made/4f855610bdabcd736100d34e4e467ea5.json +1 -0
- package/main.js +534 -0
- package/main.js.map +1 -0
- package/main.ts +547 -0
- package/mcp.js +108 -0
- package/mcp.js.map +1 -0
- package/mcp.ts +113 -0
- package/member.js +103 -0
- package/member.js.map +1 -0
- package/member.ts +133 -0
- package/memo.js +503 -0
- package/memo.js.map +1 -0
- package/memo.ts +634 -0
- package/mod.js +46 -0
- package/mod.js.map +1 -0
- package/mod.ts +99 -0
- package/operations.js +53 -0
- package/operations.js.map +1 -0
- package/operations.ts +68 -0
- package/package.json +115 -4
- package/page.js +211 -0
- package/page.js.map +1 -0
- package/page.ts +308 -0
- package/parser.js +45 -0
- package/parser.js.map +1 -0
- package/parser.ts +77 -0
- package/people-search.js +112 -0
- package/people-search.js.map +1 -0
- package/people-search.ts +162 -0
- package/platform.js +184 -0
- package/platform.js.map +1 -0
- package/platform.ts +224 -0
- package/platform_effects.js +5 -0
- package/platform_effects.js.map +1 -0
- package/platform_effects.ts +13 -0
- package/prepare.js +40 -0
- package/prepare.js.map +1 -0
- package/prepare.ts +46 -0
- package/read_activity.js +54 -0
- package/read_activity.js.map +1 -0
- package/read_activity.ts +61 -0
- package/read_thread.js +387 -0
- package/read_thread.js.map +1 -0
- package/read_thread.ts +506 -0
- package/read_worker.ts +164 -0
- package/reader.js +48 -0
- package/reader.js.map +1 -0
- package/reader.ts +57 -0
- package/release.js +82 -0
- package/release.js.map +1 -0
- package/release.json +127 -0
- package/release.ts +98 -0
- package/remote-page.ts +70 -0
- package/remote.js +96 -0
- package/remote.js.map +1 -0
- package/remote.ts +153 -0
- package/report.js +83 -0
- package/report.js.map +1 -0
- package/report.ts +101 -0
- package/reported.js +32 -0
- package/reported.js.map +1 -0
- package/reported.ts +38 -0
- package/restart.js +349 -0
- package/restart.js.map +1 -0
- package/restart.ts +478 -0
- package/restore.js +32 -0
- package/restore.js.map +1 -0
- package/restore.ts +38 -0
- package/roles.js +32 -0
- package/roles.js.map +1 -0
- package/roles.ts +49 -0
- package/roster.js +65 -0
- package/roster.js.map +1 -0
- package/roster.ts +84 -0
- package/rpc.js +113 -0
- package/rpc.js.map +1 -0
- package/rpc.ts +159 -0
- package/run.js +533 -0
- package/run.js.map +1 -0
- package/run.ts +741 -0
- package/runtime.js +381 -0
- package/runtime.js.map +1 -0
- package/runtime.ts +433 -0
- package/sandboxes.js +26 -0
- package/sandboxes.js.map +1 -0
- package/sandboxes.ts +30 -0
- package/searching.js +33 -0
- package/searching.js.map +1 -0
- package/searching.ts +50 -0
- package/show.js +109 -0
- package/show.js.map +1 -0
- package/show.ts +144 -0
- package/shown.js +13 -0
- package/shown.js.map +1 -0
- package/shown.ts +44 -0
- package/stall.js +90 -0
- package/stall.js.map +1 -0
- package/stall.ts +156 -0
- package/stall_profile.js +113 -0
- package/stall_profile.js.map +1 -0
- package/stall_profile.ts +142 -0
- package/stall_wait.js +183 -0
- package/stall_wait.js.map +1 -0
- package/stall_wait.ts +249 -0
- package/stall_wait_worker.ts +11 -0
- package/start.js +349 -0
- package/start.js.map +1 -0
- package/start.ts +343 -0
- package/starvation.js +147 -0
- package/starvation.js.map +1 -0
- package/starvation.ts +224 -0
- package/store.js +118 -0
- package/store.js.map +1 -0
- package/store.ts +193 -0
- package/subcommands.js +62 -0
- package/subcommands.js.map +1 -0
- package/subcommands.ts +77 -0
- package/terminal.js +93 -0
- package/terminal.js.map +1 -0
- package/terminal.ts +128 -0
- package/text.js +20 -0
- package/text.js.map +1 -0
- package/text.ts +37 -0
- package/tool.js +76 -0
- package/tool.js.map +1 -0
- package/tool.ts +157 -0
- package/trace_control.js +231 -0
- package/trace_control.js.map +1 -0
- package/trace_control.ts +233 -0
- package/traces.js +138 -0
- package/traces.js.map +1 -0
- package/traces.ts +160 -0
- package/tracker.js +22 -0
- package/tracker.js.map +1 -0
- package/tracker.ts +27 -0
- package/tty.js +82 -0
- package/tty.js.map +1 -0
- package/tty.ts +142 -0
- package/unit_failure.js +178 -0
- package/unit_failure.js.map +1 -0
- package/unit_failure.ts +191 -0
- package/upkeep_thread.js +32 -0
- package/upkeep_thread.js.map +1 -0
- package/upkeep_thread.ts +35 -0
- package/upkeep_worker.ts +27 -0
- package/vault.js +186 -0
- package/vault.js.map +1 -0
- package/vault.ts +220 -0
- package/vocab-ids.js +63 -0
- package/vocab-ids.js.map +1 -0
- package/vocab-ids.ts +62 -0
- package/vocab.json +35 -0
- package/warm.js +138 -0
- package/warm.js.map +1 -0
- package/warm.ts +171 -0
- package/watch_revision.js +25 -0
- package/watch_revision.js.map +1 -0
- package/watch_revision.ts +30 -0
- package/words.js +29 -0
- package/words.js.map +1 -0
- package/words.ts +41 -0
- package/workspaces.js +40 -0
- package/workspaces.js.map +1 -0
- package/workspaces.ts +58 -0
- package/yak-unit-failure.conf +6 -0
- package/yak-unit-handoff.conf +2 -0
- package/yak.js +123 -0
- package/yak.js.map +1 -0
- package/yak.ts +136 -0
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { Config } from "@yaks/host";
|
|
2
|
+
export declare let FORWARDED: string;
|
|
3
|
+
export declare let ADMIN_ACCOUNT: string;
|
|
4
|
+
export declare let CHECKS_ACCOUNT: string;
|
|
5
|
+
type Plugins = Pick<Config, 'plugins'>;
|
|
6
|
+
/** The shared box keeps a dedicated connection for agents' checks. */ export declare let boxAccount: (config: Plugins, as?: string, agent?: boolean) => string | undefined;
|
|
7
|
+
export declare let adminForward: (config: Plugins, as?: string) => string | undefined;
|
|
8
|
+
export declare let forwarded: (url: string, credential: string | null | undefined, browser: boolean, init: RequestInit) => {
|
|
9
|
+
url: string;
|
|
10
|
+
init: RequestInit;
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=account-forward.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-forward.d.ts","sources":["../account-forward.ts"],"names":[],"mappings":"AAEA,cAAc,MAAM,0BAA+B;AAEnD,OAAO,YAAI,kBAAgC;AAC3C,OAAO,YAAI,sBAAkC;AAC7C,OAAO,YAAI,uBAAoC;KAE1C,UAAU,KAAK,QAAQ;AAU5B,oEAAoE,GACpE,OAAO,YAAI,aACT,QAAQ,SACR,KAAK,MAAM,EACX,oBACC,MAAM,GAAG,SAAS,CAC4C;AAEjE,OAAO,YAAI,eACT,QAAQ,SACR,KAAK,MAAM,KACV,MAAM,GAAG,SAAS,CAIpB;AAED,OAAO,YAAI,YACT,KAAK,MAAM,EACX,YAAY,MAAM,GAAG,IAAI,GAAG,SAAS,EACrC,SAAS,OAAO,EAChB,MAAM;EACH,KAAK,MAAM;EAAE,MAAM;EASvB"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { Served } from "./host.js";
|
|
2
|
+
import { type Env } from "./store.js";
|
|
3
|
+
export declare let personalPath: (state: string) => string;
|
|
4
|
+
/** Make the personal graph only on explicit auth. Domain plugins are secrets
|
|
5
|
+
* and connections; core vocabulary, stamps and sealing effects are plumbing. */ export declare let personal: (state?: string) => Promise<string>;
|
|
6
|
+
/** One command's account handles. Only handles are kept; each lookup reads
|
|
7
|
+
* current connections and credentials, including ones added after a miss. */ /** What one command holds: its account graphs and their tokens. */ export type Accounts<H> = {
|
|
8
|
+
host: (path: string) => Promise<H>;
|
|
9
|
+
close: () => Promise<void>;
|
|
10
|
+
token: (hostName: string, state?: string, opts?: AccountOptions) => Promise<string | null>;
|
|
11
|
+
};
|
|
12
|
+
declare let command: Accounts<Served>;
|
|
13
|
+
/** Account graphs are opened once per command and closed by the CLI's final
|
|
14
|
+
* boundary. Dynamic imports keep an environment-only sandbox off the graph. */ export declare let accountHost: any;
|
|
15
|
+
export declare let closeAccounts: any;
|
|
16
|
+
export type AccountOptions = {
|
|
17
|
+
config?: string;
|
|
18
|
+
as?: string;
|
|
19
|
+
env?: Env;
|
|
20
|
+
/** The transport supports forwarding, and the caller is an agent. */ agent?: boolean;
|
|
21
|
+
};
|
|
22
|
+
/** The selected yaks.app connection, or YAKS_TOKEN for a graphless sandbox. */ export declare let accountToken: any;
|
|
23
|
+
//# sourceMappingURL=accounts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"accounts.d.ts","sources":["../accounts.ts"],"names":[],"mappings":"AAMA,cAAc,MAAM,oBAAmB;AAWvC,SAAS,KAAK,GAAG,qBAA8B;AAG/C,OAAO,YAAI,eAAgB,OAAO,MAAM,KAAG,MAAM,CAA4B;AAC7E;8EAC8E,GAC9E,OAAO,YAAI,WAAkB,QAAO,MAAM,KAAgB,QAAQ,MAAM,EAwCvE;AAsBD;2EAC2E,GAC3E,iEAAiE,GACjE,YAAY,SAAS;EACnB,OAAO,MAAM,MAAM,KAAK,QAAQ;EAChC,aAAa,QAAQ,IAAI;EACzB,QACE,UAAU,MAAM,EAChB,QAAQ,MAAM,EACd,OAAO,mBACJ,QAAQ,MAAM,GAAG,IAAI;;AAgG5B,YAAI,SAAS,SAAS;AAwBtB;6EAC6E,GAC7E,OAAO,YAAI,iBAA0B;AACrC,OAAO,YAAI,mBAA6B;AACxC,YAAY;EACV,SAAS,MAAM;EACf,KAAK,MAAM;EACX,MAAM;EACN,mEAAmE,GACnE,QAAQ,OAAO;;AAEjB,6EAA6E,GAC7E,OAAO,YAAI,kBAA4B"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import type { Bundle } from "@yaks/graph";
|
|
2
|
+
import { type Built, type Line } from "@yaks/query";
|
|
3
|
+
import { type Registry, type Renderer, type Selection } from "@yaks/render";
|
|
4
|
+
import type { ComponentRenderer } from "@yaks/react";
|
|
5
|
+
import type { Vocab } from "@yaks/vocab/runtime";
|
|
6
|
+
import { type Shown } from "@yaks/render/views";
|
|
7
|
+
import type { AnatomyObserver } from "@yaks/code/anatomy";
|
|
8
|
+
/** A terminal a held answer is drawn on: its width and how to write to it. */ export type Tty = {
|
|
9
|
+
columns: number;
|
|
10
|
+
write: (text: string) => void;
|
|
11
|
+
};
|
|
12
|
+
/** What one plugin's `./views` module offers a registry. */ export type ViewFacet = {
|
|
13
|
+
views?: Registry;
|
|
14
|
+
inspectViews?: unknown;
|
|
15
|
+
componentViews?: Selection<ComponentRenderer> | (() => Selection<ComponentRenderer> | Promise<Selection<ComponentRenderer>>);
|
|
16
|
+
};
|
|
17
|
+
/** How one plugin's `./views` becomes a module: config.ts `pluginViews` for
|
|
18
|
+
* the plugins a config names, or modules a caller hands over inline. `warm`
|
|
19
|
+
* readies several at once before they are asked for one by one. */ export type Views = ((plugin: string) => Promise<ViewFacet | null>) & {
|
|
20
|
+
warm?: (plugins: string[]) => Promise<unknown>;
|
|
21
|
+
};
|
|
22
|
+
/** Every view the `yak` command draws with, most knowing first. */ export declare function registry(plugins: string[], load: Views, observe: AnatomyObserver | undefined, components: true): Promise<Registry<Renderer | ComponentRenderer>>;
|
|
23
|
+
export declare function registry(plugins: string[], load: Views, observe?: AnatomyObserver): Promise<Registry>;
|
|
24
|
+
/** What a terminal draws with: portable views, and components of its own. */ export type Held = Selection<Renderer | ComponentRenderer>;
|
|
25
|
+
/** How one plugin's `./tui` becomes a module. */ export type Tui = (plugin: string) => Promise<{
|
|
26
|
+
views?: Held;
|
|
27
|
+
} | null>;
|
|
28
|
+
/** The views an answer held in the terminal draws with: each plugin's
|
|
29
|
+
* `./tui`, then {@link registry}'s. */ export declare let terminal: (plugins: string[], load: Views, held: Tui, observe?: AnatomyObserver) => Promise<Held>;
|
|
30
|
+
/** What a drawing has read beyond its answer, and how it asks for more:
|
|
31
|
+
* `answers` holds the rows each query a view asked answered; `eid` and `query`
|
|
32
|
+
* are told of each entity and query a view asked for, so a printout can read
|
|
33
|
+
* them and draw again; `deferred` of a renderer the host must prepare. */ export type Wants = {
|
|
34
|
+
answers?: ReadonlyMap<string, Bundle[]>;
|
|
35
|
+
eid?: (eid: string) => void;
|
|
36
|
+
query?: (q: string) => void;
|
|
37
|
+
deferred?: (renderer: Renderer) => void;
|
|
38
|
+
};
|
|
39
|
+
/** What a tool declared that decides how its answer is drawn: one that is not
|
|
40
|
+
* `readOnly` wrote, so its answer is drawn as its entities now stand
|
|
41
|
+
* ({@link standing}); a `page` tool's lone entity is drawn whole. */ export type Drawn = {
|
|
42
|
+
readOnly?: boolean;
|
|
43
|
+
page?: boolean;
|
|
44
|
+
};
|
|
45
|
+
export declare let viewOf: (them: Bundle[], page: boolean) => 'Page' | 'Tile';
|
|
46
|
+
/** The entities an answer's references point at that the answer does not
|
|
47
|
+
* carry itself: what a printed reference needs looked up to read as `P-19`
|
|
48
|
+
* rather than as its handle. `page` is the eid of the entity drawn whole, if
|
|
49
|
+
* one is; every other is drawn as its `Tile`. */ export declare let referenced: (vocab: Vocab, answer: Bundle[], views?: Held, page?: string) => string[];
|
|
50
|
+
/** What a page draws beside an entity: the links it is in and the comments
|
|
51
|
+
* aimed at it. A tool answers only what it was asked for, so the page asks
|
|
52
|
+
* for these itself, in the one query {@link nearQuery} writes. */ export type Near = {
|
|
53
|
+
links: Bundle[];
|
|
54
|
+
comments: Bundle[];
|
|
55
|
+
};
|
|
56
|
+
/** The one query a page asks about the entity it draws: the links it is in,
|
|
57
|
+
* bar META, and the comments aimed at it — each only where this vocabulary
|
|
58
|
+
* has the component, and none at all where it has neither. */ export declare let nearQuery: (vocab: Vocab, eid: string) => Built | null;
|
|
59
|
+
export declare let nearOf: (eid: string, found: Bundle[]) => Near;
|
|
60
|
+
export declare let parted: (answer: Bundle[]) => {
|
|
61
|
+
them: Bundle[];
|
|
62
|
+
hits: Bundle[];
|
|
63
|
+
};
|
|
64
|
+
export declare let drawn: <Node>(vocab: Vocab, answer: Bundle[], named: Bundle[], page: Near | undefined, draw: (b: Bundle, view: string, ctx: Shown<Node>) => Node | null, want?: Wants) => (Node | null)[][];
|
|
65
|
+
export declare let joined: (groups: string[][]) => string;
|
|
66
|
+
export declare let nothing: Near;
|
|
67
|
+
export declare let freshness: (answer: Bundle[], page?: Near) => string;
|
|
68
|
+
/** An answer as the lines a terminal prints. `named` holds the entities its
|
|
69
|
+
* references point at, so each prints as its id; one not there prints as its
|
|
70
|
+
* handle. Each entity is a line, unless the answer is drawn as a `page`: then
|
|
71
|
+
* a lone entity is its `Page`, with what the page holds beside it. */ export declare let printed: (views: Registry, vocab: Vocab, answer: Bundle[], named?: Bundle[], page?: Near, want?: Wants) => string;
|
|
72
|
+
/** Where a drawing asks for what it draws beyond the answer, from wherever
|
|
73
|
+
* the answer came from: `lookup` reads entities by eid, so a reference
|
|
74
|
+
* prints as the id a person types, and `query` answers a page's
|
|
75
|
+
* {@link nearQuery}. */ export type Source = {
|
|
76
|
+
lookup: (eids: string[]) => Bundle[] | Promise<Bundle[]>;
|
|
77
|
+
query: (q: Line) => Bundle[] | Promise<Bundle[]>;
|
|
78
|
+
};
|
|
79
|
+
/** What a read that found nothing prints. */ export declare let NONE: string;
|
|
80
|
+
/** A write's answer as a person reads it: each entity it changed as that
|
|
81
|
+
* entity now stands, where it still does. The answer itself is the batch as
|
|
82
|
+
* applied — what `--json` prints — and names only what moved, so drawn as it
|
|
83
|
+
* is, `task update T-3 done` would be an entity with a `completed` mark and no
|
|
84
|
+
* title. One that no longer stands (a deletion's tombstone) is drawn as the
|
|
85
|
+
* answer has it, and so are the call's own words (`$said`, or `output` aimed
|
|
86
|
+
* at the call, under whatever eid a host minted for them): they are no row,
|
|
87
|
+
* and asking for one is a graph_show refused as naming nothing. */ export declare let standing: (answer: Bundle[], from: Source) => Promise<Bundle[]>;
|
|
88
|
+
//# sourceMappingURL=answer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"answer.d.ts","sources":["../answer.ts"],"names":[],"mappings":"AAiBA,cAAc,MAAM,2BAAgC;AACpD,SAAS,KAAK,KAAK,EAAmB,KAAK,IAAI,2BAA2C;AAG1F,SAME,KAAK,QAAQ,EAEb,KAAK,QAAQ,EAEb,KAAK,SAAS,4BACgB;AAChC,cAAc,iBAAiB,2BAAgC;AAG/D,cAAc,KAAK,mCAAwC;AAC3D,SAAuB,KAAK,KAAK,kCAAyD;AAC1F,cAAc,eAAe,kCAAuC;AAGpE,4EAA4E,GAC5E,YAAY;EAAQ,SAAS,MAAM;EAAE,QAAQ,MAAM,MAAM,KAAK,IAAI;;AAElE,0DAA0D,GAC1D,YAAY;EACV,QAAQ;EACR,eAAe,OAAO;EACtB,iBACI,UAAU,4BAER,UAAU,qBACV,QAAQ,UAAU;;AAE1B;;iEAEiE,GACjE,YAAY,UAAU,QA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,YAAI,QAAS,MAClB,OAAO,OACP,QAAQ,UACR,OAAO,UACP,MAAM,OAAO,SAAS,EACtB,OAAO,GAAG,QAAQ,MAAM,MAAM,EAAE,KAAK,MAAM,UAAU,OAAO,IAAI,EAChE,OAAM,WACJ,OAAO,IAAI,MAkBd;AAID,OAAO,YAAI,SAAU,QAAQ,MAAM,SAAO,MAAM,CAC8B;AAE9E,OAAO,YAAI,SAAS,KAAkC;AAItD,OAAO,YAAI,YAAa,QAAQ,UAAU,OAAO,SAAO,MAAM,CAI7D;AAED;;;oEAGoE,GACpE,OAAO,YAAI,UACT,OAAO,UACP,OAAO,OACP,QAAQ,UACR,QAAO,UACP,OAAO,MACP,OAAM,UACL,MAAM,CAaR;AAED;;;sBAGsB,GACtB,YAAY;EACV,SAAS,MAAM,MAAM,OAAO,WAAW,QAAQ;EAC/C,QAAQ,GAAG,SAAS,WAAW,QAAQ;;AAQzC,2CAA2C,GAC3C,OAAO,YAAI,aAAa;AAExB;;;;;;;iEAOiE,GACjE,OAAO,YAAI,WACT,QAAQ,UACR,MAAM,WACL,QAAQ,UAOV"}
|
package/_dist/apply.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/** How many bundles are sent in one `graph_apply` call. */ export declare let CHUNK: number;
|
|
2
|
+
/**
|
|
3
|
+
* The bundles in a body: one JSON value per line, or a single JSON array.
|
|
4
|
+
* Blank lines are ignored.
|
|
5
|
+
*
|
|
6
|
+
* ```ts
|
|
7
|
+
* bundlesIn('{"a":1}\n\n{"b":2}\n') // [{a: 1}, {b: 2}]
|
|
8
|
+
* ```
|
|
9
|
+
*/ export declare let bundlesIn: (body: string) => unknown[];
|
|
10
|
+
/**
|
|
11
|
+
* A list split into fixed-size chunks.
|
|
12
|
+
*
|
|
13
|
+
* ```ts
|
|
14
|
+
* chunks([1, 2, 3], 2) // [[1, 2], [3]]
|
|
15
|
+
* ```
|
|
16
|
+
*/ export declare let chunks: <T>(xs: T[]) => T[][];
|
|
17
|
+
//# sourceMappingURL=apply.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apply.d.ts","sources":["../apply.ts"],"names":[],"mappings":"AAWA,yDAAyD,GACzD,OAAO,YAAI,cAAU;AAErB;;;;;;;CAOC,GACD,OAAO,YAAI,YAAa,MAAM,MAAM,KAAG,OAAO,GAkB7C;AAED;;;;;;CAMC,GACD,OAAO,YAAI,SAAU,GAAG,IAAI,QAAoB,MAI/C"}
|
package/_dist/args.d.ts
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { CallError } from "@yaks/tools/errors";
|
|
2
|
+
import { type Prop, type Schema } from "./tool.js";
|
|
3
|
+
/** As much of a tool as a command line reads: what it is called, the schema
|
|
4
|
+
* its arguments must satisfy, and how they are written on a command line. A
|
|
5
|
+
* tool an MCP server listed (tool.ts `Listed`) and one this process runs
|
|
6
|
+
* (@yaks/graph `Tool`) both carry this much. */ export type Grammar = {
|
|
7
|
+
name?: string;
|
|
8
|
+
noun?: string;
|
|
9
|
+
verb?: string;
|
|
10
|
+
inputSchema?: Schema | Record<string, unknown>;
|
|
11
|
+
positional?: readonly string[];
|
|
12
|
+
/** Words retained verbatim for another schema to parse. */ forward?: string;
|
|
13
|
+
};
|
|
14
|
+
/** An app's vocabulary declaration, in the same grammar as package tools.
|
|
15
|
+
* Positionals and short flags come only from its declaration. */ export declare let appGrammar: (name: string, tool: {
|
|
16
|
+
input?: Record<string, Prop>;
|
|
17
|
+
required?: string[];
|
|
18
|
+
positional?: Grammar['positional'];
|
|
19
|
+
}) => Grammar;
|
|
20
|
+
/** The command line was wrong — nothing ran, and the exit code is 2. The
|
|
21
|
+
* caller's own mistake, so a refusal (@yaks/tools `CallError`), never a
|
|
22
|
+
* defect to report. */ export declare class Usage extends CallError {
|
|
23
|
+
constructor(message: string);
|
|
24
|
+
}
|
|
25
|
+
/** Where an expanded value is read from. A test passes two functions and
|
|
26
|
+
* touches no disk. */ export type Reads = {
|
|
27
|
+
file: (path: string) => string | Promise<string>;
|
|
28
|
+
stdin: () => string | Promise<string>;
|
|
29
|
+
/** The command’s working directory, for tools that accept `cwd`. */ cwd?: () => string;
|
|
30
|
+
};
|
|
31
|
+
/** A parsed command line: options in the order they were given (a bare flag
|
|
32
|
+
* is `true`), and the bare words that named no option. */ export type Said = {
|
|
33
|
+
opts: [string, string | true][];
|
|
34
|
+
words: string[];
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Split a command line into options and bare words. A `--name` whose next word
|
|
38
|
+
* is not itself an option takes that word as its value; otherwise it is a
|
|
39
|
+
* flag. `--name=value` always takes the value, which is the only way to pass a
|
|
40
|
+
* value that itself starts with `--`.
|
|
41
|
+
*
|
|
42
|
+
* ```ts
|
|
43
|
+
* saidIn(['--q', '.recipe', '--json'])
|
|
44
|
+
* // { opts: [['q', '.recipe'], ['json', true]], words: [] }
|
|
45
|
+
* ```
|
|
46
|
+
*/ export declare let saidIn: (argv: string[]) => Said;
|
|
47
|
+
/** `@path` reads that file, `-` and `@-` read stdin, anything else is used as
|
|
48
|
+
* given. */ export declare let inflate: (word: string, reads?: Reads) => Promise<string>;
|
|
49
|
+
/** One expanded argument, converted to the type its property declares. A
|
|
50
|
+
* string stays a string — JSON-looking or not — so a title that reads like a
|
|
51
|
+
* number is still a title. */ export declare let valueOf: (name: string, raw: string, p?: Prop) => unknown;
|
|
52
|
+
/** Nullable fields the CLI can clear. A declared clear argument keeps its own
|
|
53
|
+
* meaning; the CLI adds no option that would hide it. */ export declare let clearable: (tool: Grammar) => string[];
|
|
54
|
+
/**
|
|
55
|
+
* The arguments a tool was given, parsed through its own input schema — the
|
|
56
|
+
* one grammar there is. The bare words fill `positional` in order; a final
|
|
57
|
+
* name suffixed `...` takes the remaining words; `name=value`, `--name value`,
|
|
58
|
+
* `--name=value` and a declared short `-n` name a property, a boolean one is a
|
|
59
|
+
* flag, a repeated one builds its list, and `--` ends the options. Every value
|
|
60
|
+
* expands (`@path`, `-`) before its type is consulted, and the whole object is
|
|
61
|
+
* then validated against the schema, which is also what fills in its defaults.
|
|
62
|
+
*
|
|
63
|
+
* Throws {@link Usage} — exit code 2 — for anything the command line got
|
|
64
|
+
* wrong.
|
|
65
|
+
*/ export declare let argsFor: (tool: Grammar, argv: readonly string[], reads?: Reads) => Promise<Record<string, unknown>>;
|
|
66
|
+
export declare let commandFor: <T extends Grammar>(tools: readonly T[], argv: readonly string[]) => {
|
|
67
|
+
verb: T;
|
|
68
|
+
args: string[];
|
|
69
|
+
} | undefined;
|
|
70
|
+
/** A typed line's words and their replacement ranges. Incomplete quotes are
|
|
71
|
+
* allowed only while completing; parsing asks for a closed line. */ export declare let tokensIn: (line: string, partial?: boolean) => {
|
|
72
|
+
value: string;
|
|
73
|
+
from: number;
|
|
74
|
+
to: number;
|
|
75
|
+
}[];
|
|
76
|
+
/** The single argument walk used by parsing and completion. A partial walk
|
|
77
|
+
* reports the property still awaiting a value, without requiring the schema's
|
|
78
|
+
* remaining mandatory properties. */ export declare let scanned: (tool: Grammar, argv: readonly string[], partial?: boolean) => {
|
|
79
|
+
pairs: [string, string | true | null][];
|
|
80
|
+
spare: string[];
|
|
81
|
+
given: Set<string>;
|
|
82
|
+
literal: boolean;
|
|
83
|
+
pending: string | undefined;
|
|
84
|
+
awaiting: string | undefined;
|
|
85
|
+
};
|
|
86
|
+
//# sourceMappingURL=args.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"args.d.ts","sources":["../args.ts"],"names":[],"mappings":"AAkBA,SAAS,SAAS,kCAAuC;AAEzD,SAAoB,KAAK,IAAI,EAAE,KAAK,MAAM,oBAA2B;AAErE;;;8CAG8C,GAC9C,YAAY;EACV,OAAO,MAAM;EACb,OAAO,MAAM;EACb,OAAO,MAAM;EACb,cAAc,SAAS,OAAO,MAAM,EAAE,OAAO;EAC7C,sBAAsB,MAAM;EAC5B,yDAAyD,GACzD,UAAU,MAAM;;AAGlB;+DAC+D,GAC/D,OAAO,YAA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ACb,OAAO,IAAI,MAAM;EACjB,SAAS,OAAO;EAChB,SAAS,MAAM,GAAG,SAAS;EAC3B,UAAU,MAAM,GAAG,SAAS;EAoJ7B"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type Reads } from "./args.js";
|
|
2
|
+
import type { Command } from "./run.js";
|
|
3
|
+
import { type Rpc } from "./rpc.js";
|
|
4
|
+
import { type Result } from "./roster.js";
|
|
5
|
+
/** Fetch a tool's schema, parse its words with the CLI grammar, and call it.
|
|
6
|
+
* Connector tools take precedence over the commands of reachable apps. The
|
|
7
|
+
* caller supplies the RPC door, so login and admin account selection share
|
|
8
|
+
* this whole path. */ export declare let toolCall: (ask: Rpc, name: string, words: string[], o?: {
|
|
9
|
+
app?: string;
|
|
10
|
+
reads?: Reads;
|
|
11
|
+
}) => Promise<Result>;
|
|
12
|
+
/** Remote tools and apps' commands, as subcommands of this program. */ export declare let appTools: Command[];
|
|
13
|
+
/** `yak <app> <command>`: only reached when no command or command noun claims
|
|
14
|
+
* the first word, so a tool or noun of the same name always wins. */ export declare let appStray: (app: string, args: string[]) => Command | undefined;
|
|
15
|
+
//# sourceMappingURL=commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commands.d.ts","sources":["../commands.ts"],"names":[],"mappings":"AAKA,SAAgC,KAAK,KAAK,oBAA0B;AACpE,cAAc,OAAO,mBAAuB;AAE5C,SAAkB,KAAK,GAAG,mBAAkB;AAC5C,SAAS,KAAK,MAAM,sBAA6B;AAUjD;;;oBAGoB,GACpB,OAAO,YAAI,WACT,KAAK,KACL,MAAM,MAAM,EACZ,OAAO,MAAM,IACb;EAAK,MAAM,MAAM;EAAE,QAAQ;MAC1B,QAAQ,QA6CV;AA2CD,qEAAqE,GACrE,OAAO,YAAI,UAAU,UAQnB;AAEF;mEACmE,GACnE,OAAO,YAAI,WAAY,KAAK,MAAM,EAAE,MAAM,MAAM,OAAK,UAAU,SAAS,CAYvE"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { type Grammar } from "./args.js";
|
|
2
|
+
/** The two answers only a graph can give. Left out, a `ref` or a full-text
|
|
3
|
+
* argument simply offers nothing, which is all a client with no connection
|
|
4
|
+
* knows. */ export type Lookup = {
|
|
5
|
+
/** the entities carrying `comp`, as the ids a person would type */ ids?: (comp: string, prefix: string) => string[] | Promise<string[]>;
|
|
6
|
+
/** what the full-text index finds for a partial word */ hits?: (prefix: string) => string[] | Promise<string[]>;
|
|
7
|
+
};
|
|
8
|
+
/** Quote a replacement word so parsing it yields the offered value. Shell
|
|
9
|
+
* argv callers already own quoting and receive raw values instead. */ export declare let quoted: (word: string) => string;
|
|
10
|
+
/**
|
|
11
|
+
* What could come next, given the tools and the line so far. Each result is a
|
|
12
|
+
* whole word, never the remaining characters — a shell hook and the harness's
|
|
13
|
+
* `:` prompt both replace the word being typed.
|
|
14
|
+
*/ export declare let complete: (tools: readonly Grammar[], line: string | readonly string[], look?: Lookup) => Promise<string[]>;
|
|
15
|
+
//# sourceMappingURL=complete.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"complete.d.ts","sources":["../complete.ts"],"names":[],"mappings":"AAoBA,SAGE,KAAK,OAAO,oBAGI;AAElB;;UAEU,GACV,YAAY;EACV,iEAAiE,GACjE,OAAO,MAAM,MAAM,EAAE,QAAQ,MAAM,KAAK,MAAM,KAAK,QAAQ,MAAM;EACjE,sDAAsD,GACtD,QAAQ,QAAQ,MAAM,KAAK,MAAM,KAAK,QAAQ,MAAM;;AAStD;oEACoE,GACpE,OAAO,YAAI,SAAU,MAAM,MAAM,KAAG,MAAM,CAMzC;AA2CD;;;;CAIC,GACD,OAAO,YAAI,WACT,gBAAgB,WAChB,MAAM,MAAM,YAAY,MAAM,IAC9B,OAAM,WACL,QAAQ,MAAM,IA+ChB"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
export type { Config, Options, Plug } from "@yaks/host";
|
|
2
|
+
import type { Config } from "@yaks/host";
|
|
3
|
+
import type { Eid, Graph } from "@yaks/graph";
|
|
4
|
+
/** Where a machine keeps the config for its own graph. */ export declare let OWN_CONFIG: string;
|
|
5
|
+
/** The person who works at this machine, as the entity the config's `person`
|
|
6
|
+
* names, or nobody where it names none: a machine never guesses who is at its
|
|
7
|
+
* keyboard. What they type at it is written by them. */ export declare let person: (host: {
|
|
8
|
+
config: Pick<Config, 'person'>;
|
|
9
|
+
graph: Pick<Graph, 'address'>;
|
|
10
|
+
}) => Promise<Eid | undefined>;
|
|
11
|
+
/** Where this machine keeps the config for its own graph, whether or not it
|
|
12
|
+
* has one yet: under `$HOME`, or nowhere for a process that has none. */ export declare let ownConfig: (env?: (name: string) => string | undefined) => string | undefined;
|
|
13
|
+
/** The config a command opens: the path it was given, else `$YAK_CONFIG`,
|
|
14
|
+
* else the one this machine keeps for its own graph. A machine that has a
|
|
15
|
+
* graph is the ordinary case, so a bare `yak task list` there reads from it
|
|
16
|
+
* rather than reaching for a remote server it was never told about. No file
|
|
17
|
+
* there means no config. */ export declare let configPath: (said?: string, env?: (name: string) => string | undefined) => string | undefined;
|
|
18
|
+
export { given, used } from "@yaks/host/config";
|
|
19
|
+
export { exported, located, pluginTui, pluginViews, ships, subpath, subpaths, unexported } from "./facets.js";
|
|
20
|
+
/** Whether the config at `path` names `part`: a command about that part of a
|
|
21
|
+
* config (a box's process plan, its tracker) is offered only where it does.
|
|
22
|
+
* No config, or one that cannot be read, names nothing.
|
|
23
|
+
*
|
|
24
|
+
* ```ts
|
|
25
|
+
* import { assertEquals } from '@std/assert'
|
|
26
|
+
* assertEquals(names(undefined, 'processes'), false)
|
|
27
|
+
* ```
|
|
28
|
+
*/ export declare let names: (path: string | undefined, part: keyof Config) => boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Read a config file. Paths inside it — the database, a relative plugin — are
|
|
31
|
+
* resolved against the file itself.
|
|
32
|
+
*/ export declare let read: (path: string) => Config;
|
|
33
|
+
/** The database a config names. `DB_PATH` is the other way to give it, for a
|
|
34
|
+
* service file that would rather set it in the environment. Neither has a
|
|
35
|
+
* default, because the path anybody would pick as one is somebody's live
|
|
36
|
+
* graph. */ export declare let dbOf: (config: Config, env?: (name: string) => string | undefined) => string;
|
|
37
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sources":["../config.ts"],"names":[],"mappings":"AAmBA,cAAc,MAAM,EAAE,OAAO,EAAE,IAAI,0BAA+B;AAClE,cAAc,MAAM,0BAAqC;AACzD,cAAc,GAAG,EAAE,KAAK,2BAAgC;AAExD,wDAAwD,GACxD,OAAO,YAAI,mBAA4B;AAEvC;;sDAEsD,GACtD,OAAO,YAAI,SACT;EAAQ,QAAQ,KAAK,QAAQ;EAAW,OAAO,KAAK,OAAO;MAC1D,QAAQ,MAAM,SAAS,EAGzB;AAED;uEACuE,GACvE,OAAO,YAAI,YACT,OAAM,MAAM,MAAM,KAAK,MAAM,GAAG,SAAS,KACxC,MAAM,GAAG,SAAS,CAGpB;AAED;;;;0BAI0B,GAC1B,OAAO,YAAI,aACT,OAAO,MAAM,EACb,OAAM,MAAM,MAAM,KAAK,MAAM,GAAG,SAAS,KACxC,MAAM,GAAG,SAAS,CAYpB;AAaD,SAAS,KAAK,EAAE,IAAI,iCAAsC;AAC1D,SACE,QAAQ,EACR,OAAO,EACP,SAAS,EACT,WAAW,EACX,KAAK,EACL,OAAO,EACP,QAAQ,EACR,UAAU,sBACQ;AAOpB;;;;;;;;CAQC,GACD,OAAO,YAAI,QAAS,MAAM,MAAM,GAAG,SAAS,EAAE,YAAY,WAAS,OAAO,CAOzE;AAED;;;CAGC,GACD,OAAO,YAAI,OAAQ,MAAM,MAAM,KAAG,OA4CjC;AAED;;;UAGU,GACV,OAAO,YAAI,OACT,QAAQ,QACR,OAAM,MAAM,MAAM,KAAK,MAAM,GAAG,SAAS,KACxC,MAAM,CASR"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/** The workspace's member directories under root: package.json's
|
|
2
|
+
* `workspaces`, each a directory or `dir/*` for every package beneath it. */ export declare let members: (root?: string) => string[];
|
|
3
|
+
/** Whether root's node_modules was installed from another lockfile. */ export declare let stale: (root?: string) => boolean;
|
|
4
|
+
/** Install a stale checkout. Installers take turns by locking the lockfile,
|
|
5
|
+
* which a frozen install only reads. */ export declare let installed: (root?: string, source?: string) => Promise<boolean>;
|
|
6
|
+
//# sourceMappingURL=dependencies.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dependencies.d.ts","sources":["../dependencies.ts"],"names":[],"mappings":"AAqBA;2EAC2E,GAC3E,OAAO,YAAI,UAAW,OAAM,MAAM,KAAW,MAAM,GAelD;AAED,qEAAqE,GACrE,OAAO,YAAI,QAAS,OAAM,MAAM,KAAW,OAAO,CAC6B;AA6D/E;sCACsC,GACtC,OAAO,YAAI,YACT,OAAM,MAAM,EACZ,SAAS,MAAM,KACd,QAAQ,OAAO,EA8BjB"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { Tui, Views } from "./answer.js";
|
|
2
|
+
/** Whether importing `spec` failed only because its package does not export
|
|
3
|
+
* that subpath: a module it does not have. Anything else that goes wrong
|
|
4
|
+
* importing one — a syntax error, a missing dependency, a throw at module
|
|
5
|
+
* scope — is that module failing, and is rethrown: a host that quietly runs
|
|
6
|
+
* without its rules is worse than one that refuses to start. A package from
|
|
7
|
+
* JSR is named with its version in Deno's refusal.
|
|
8
|
+
*
|
|
9
|
+
* ```ts
|
|
10
|
+
* import { assertEquals } from '@std/assert'
|
|
11
|
+
* let refusal = (message: string) => new TypeError(message)
|
|
12
|
+
* assertEquals(unexported(refusal("Unknown export './vocab' for '@yaks/mcp'.\n Package exports:"), '@yaks/mcp/vocab'), true)
|
|
13
|
+
* assertEquals(unexported(refusal("Unknown export './vocab' for '@yaks/mcp@0.2.12'.\n Package exports:"), 'jsr:@yaks/mcp@0.2.12/vocab'), true)
|
|
14
|
+
* assertEquals(unexported(refusal("Unknown export './vocab' for '@yaks/mcp@0.2.12'."), 'jsr:@yaks/doc@0.2.12/vocab'), false)
|
|
15
|
+
* assertEquals(unexported(refusal('Module not found "file:///p/vocab.ts".'), 'file:///p/vocab.ts'), true)
|
|
16
|
+
* assertEquals(unexported(new SyntaxError('Unexpected token'), '@yaks/mcp/vocab'), false)
|
|
17
|
+
* ```
|
|
18
|
+
*/ export declare let unexported: (error: unknown, spec: string) => boolean;
|
|
19
|
+
/** Whether a plugin exports a subpath, asked of the resolver rather than by
|
|
20
|
+
* importing it: what a process checks before it hands a role to a thread
|
|
21
|
+
* that would only find the facet missing. A plugin named by a path answers
|
|
22
|
+
* yes, since only importing it can tell. */ export declare let exported: (plugin: string, name: string) => boolean;
|
|
23
|
+
/** Whether the release this CLI came from says the package `key` names
|
|
24
|
+
* exports its subpath, or undefined where it does not name the package: a
|
|
25
|
+
* checkout, or a plugin named by path (./release.ts `shipped`).
|
|
26
|
+
*
|
|
27
|
+
* ```ts
|
|
28
|
+
* import { assertEquals } from '@std/assert'
|
|
29
|
+
* let at = { '@yaks/doc': ['.', './vocab'] }
|
|
30
|
+
* assertEquals(ships('@yaks/doc/vocab', at), true)
|
|
31
|
+
* assertEquals(ships('@yaks/doc/routes', at), false)
|
|
32
|
+
* assertEquals(ships('@yaks/tools/vocab', at), undefined)
|
|
33
|
+
* assertEquals(ships('./plugins/mail/vocab', at), undefined)
|
|
34
|
+
* ```
|
|
35
|
+
*/ export declare let ships: (key: string, release?: Readonly<Record<string, readonly string[]>>) => boolean | undefined;
|
|
36
|
+
/** Where a bare `@yaks/…` name is imported from. Inside a workspace the
|
|
37
|
+
* import map resolves it; a `yak` installed from JSR has no map entry for a
|
|
38
|
+
* package it does not itself import (a plugin a config names, the views of a
|
|
39
|
+
* component another plugin declared), so the name goes to JSR at the release
|
|
40
|
+
* at the version this CLI's release pins it to (./release.ts `pinned`), which
|
|
41
|
+
* keeps every plugin and view one coherent set. `resolve` is
|
|
42
|
+
* `import.meta.resolve`, which throws for a name nothing maps.
|
|
43
|
+
*
|
|
44
|
+
* ```ts
|
|
45
|
+
* import { assertEquals } from '@std/assert'
|
|
46
|
+
* let none = (): string => {
|
|
47
|
+
* throw new TypeError('not a dependency')
|
|
48
|
+
* }
|
|
49
|
+
* let at = { '@yaks/tools': '1.2.3' }
|
|
50
|
+
* assertEquals(located('@yaks/tools/views', none, at), 'jsr:@yaks/tools@1.2.3/views')
|
|
51
|
+
* assertEquals(located('@yaks/tools/views', (s) => s, at), '@yaks/tools/views')
|
|
52
|
+
* assertEquals(located('./plugins/mail/vocab', none, at), './plugins/mail/vocab')
|
|
53
|
+
* ```
|
|
54
|
+
*/ export declare let located: (spec: string, resolve?: (spec: string) => string, release?: Readonly<Record<string, string>>) => string;
|
|
55
|
+
/** `import('<plugin>/<name>')`, or `null` where the package does not export
|
|
56
|
+
* that subpath — a facet, or the `./views` a caller draws with. Each answer is
|
|
57
|
+
* asked for once: a module is imported once a process whoever asks, and a
|
|
58
|
+
* subpath a package does not export stays unexported, where finding that out
|
|
59
|
+
* again costs an import that throws. */ export declare let subpath: <M>(plugin: string, name: string) => Promise<M | null>;
|
|
60
|
+
/** Each plugin's `./views`, the ones a config names: warmed as one module
|
|
61
|
+
* graph when a registry asks for several (@yaks/cli answer.ts `registry`). */ export declare let pluginViews: Views;
|
|
62
|
+
/** Each plugin's `./tui`, what a held answer draws with first. */ export declare let pluginTui: Tui;
|
|
63
|
+
/** Load selected subpaths and required modules as one module graph where
|
|
64
|
+
* their exports are known: by the resolver for a file, by the release
|
|
65
|
+
* (`ships`) for a package from JSR. Deno otherwise builds a separate
|
|
66
|
+
* dependency graph per concurrent dynamic import, rediscovering shared
|
|
67
|
+
* dependencies for each. Module answers follow the subpath answers; only
|
|
68
|
+
* subpaths can be absent. A JSR package the release does not name still uses
|
|
69
|
+
* the ordinary loader, which alone can say whether its optional export
|
|
70
|
+
* exists. Nothing is written to disk. */ export declare let subpaths: (requests: readonly (readonly [plugin: string, name: string])[], modules?: readonly string[]) => Promise<unknown[]>;
|
|
71
|
+
//# sourceMappingURL=facets.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"facets.d.ts","sources":["../facets.ts"],"names":[],"mappings":"AAEA,cAAoB,GAAG,EAAa,KAAK,sBAAqB;AAI9D;;;;;;;;;;;;;;;;CAgBC,GACD,OAAO,YAAI,aAAc,OAAO,OAAO,EAAE,MAAM,MAAM,KAAG,OAAO,CAU9D;AAED;;;0CAG0C,GAC1C,OAAO,YAAI,WAAY,QAAQ,MAAM,EAAE,MAAM,MAAM,KAAG,OAAO,CAQ5D;AAED;;;;;;;;;;;;CAYC,GACD,OAAO,YAAI,QACT,KAAK,MAAM,EACX,UAAS,SAAS,OAAO,MAAM,WAAW,MAAM,SAC/C,OAAO,GAAG,SAAS,CAMrB;AAED;;;;;;;;;;;;;;;;;;CAkBC,GACD,OAAO,YAAI,UACT,MAAM,MAAM,EACZ,WAAU,MAAM,MAAM,KAAK,MAAM,EACjC,UAAS,SAAS,OAAO,MAAM,EAAE,MAAM,OACtC,MAAM,CAWR;AAED;;;;sCAIsC,GACtC,OAAO,YAAI,UAAW,GAAG,QAAQ,MAAM,EAAE,MAAM,MAAM,KAAG,QAAQ,IAAI,IAAI,EASvE;AACD;4EAC4E,GAC5E,OAAO,YAAI,aAAa,MAMvB;AAED,gEAAgE,GAChE,OAAO,YAAI,WAAW,IAA0D;AAEhF;;;;;;;uCAOuC,GACvC,OAAO,YAAI,WACT,8BAA8B,QAAQ,MAAM,EAAE,MAAM,MAAM,MAC1D,mBAAkB,MAAM,OACvB,QAAQ,OAAO,IA6DjB"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/** Browser-safe command grammar, completion and help text, with no runtime IO. */ export * from "./args.js";
|
|
2
|
+
export { complete, type Lookup, quoted } from "./complete.js";
|
|
3
|
+
export { type Prop, type Schema } from "./tool.js";
|
|
4
|
+
export { toolHelp, toolLines } from "./show.js";
|
|
5
|
+
//# sourceMappingURL=grammar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"grammar.d.ts","sources":["../grammar.ts"],"names":[],"mappings":"AAAA,gFAAgF,GAChF,0BAAyB;AACzB,SAAS,QAAQ,EAAE,KAAK,MAAM,EAAE,MAAM,wBAAuB;AAC7D,SAAS,KAAK,IAAI,EAAE,KAAK,MAAM,oBAAmB;AAClD,SAAS,QAAQ,EAAE,SAAS,oBAAmB"}
|
package/_dist/host.d.ts
ADDED
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The graph a config file names, opened by a process for the roles it serves.
|
|
3
|
+
*
|
|
4
|
+
* A plugin says what it contributes, one facet per subpath: the components and
|
|
5
|
+
* tools it declares (`@yaks/mail/vocab`), what it adds to a graph (`/graph`), the
|
|
6
|
+
* functions behind its tools (`/tools`), what runs after a commit
|
|
7
|
+
* (`/effects`), the work it keeps doing while a process is up (`/service`), the
|
|
8
|
+
* HTTP it adds (`/routes`), its terminal controls (`/cli`), and how its
|
|
9
|
+
* entities are drawn (`/views`, `/tui`) and dressed (`/ui`, their kits, UX kits, themes and skins).
|
|
10
|
+
* It never says where any of that runs. A process serves roles, and imports
|
|
11
|
+
* only the facets of the roles it serves:
|
|
12
|
+
*
|
|
13
|
+
* ```
|
|
14
|
+
* graph vocab, graph, tools open the file, admit writes, run tool calls
|
|
15
|
+
* web routes, ui the HTTP a listener answers with
|
|
16
|
+
* effects effects the code behind the effects a commit owes
|
|
17
|
+
* @yaks/mail that plugin's service the timer or poll one plugin keeps up
|
|
18
|
+
* ```
|
|
19
|
+
*
|
|
20
|
+
* The first three are {@link ROLES}, which every graph has; a plugin with a
|
|
21
|
+
* `./service` brings a role of its own, named by its package. The config names
|
|
22
|
+
* the plugins; each process picks its roles. `yak serve` serves `web`, the
|
|
23
|
+
* role @yaks/api's `serve` declares. A `yak` command serves commands and
|
|
24
|
+
* rendering, which are its own (./run.ts, ./answer.ts), and reaches the graph
|
|
25
|
+
* either through a server or by composing the graph role here itself
|
|
26
|
+
* (local.ts). A host that stays up explicitly starts duty roles in a thread
|
|
27
|
+
* of the same process (@yaks/threads), a host of its own. A role
|
|
28
|
+
* this process does not serve costs it nothing: its facets
|
|
29
|
+
* are never imported, so a command that opens the graph to read it never loads
|
|
30
|
+
* a line of HTTP, and a process that serves no `web` never asks a plugin for a
|
|
31
|
+
* route.
|
|
32
|
+
*
|
|
33
|
+
* {@link compose} opens the box's SQLite file, vault and capabilities and calls
|
|
34
|
+
* {@link assembly} in @yaks/host to load facets and build the graph over the
|
|
35
|
+
* plugins' rules and the other roles' contributions. A subpath a package does not export is skipped;
|
|
36
|
+
* one that exists and fails to import is an error, never a skip. Nothing here
|
|
37
|
+
* binds a port: `serve`, declared and implemented by
|
|
38
|
+
* {@link https://jsr.io/@yaks/api | @yaks/api}, listens with the
|
|
39
|
+
* {@link Host.handler} built here, and only a config naming @yaks/api has one.
|
|
40
|
+
*
|
|
41
|
+
* ```ts
|
|
42
|
+
* import { compose } from '@yaks/cli/host'
|
|
43
|
+
*
|
|
44
|
+
* // let config = { db: 'graph.db', plugins: ['@yaks/task'] }
|
|
45
|
+
* // let host = await compose(config, ['graph'])
|
|
46
|
+
* // console.log(await host.graph.read('.task'))
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
49
|
+
* @module
|
|
50
|
+
*/ import type { Actor, Bundle, NamedTool, Storage } from "@yaks/graph";
|
|
51
|
+
import type { Vocab, VocabDoc } from "@yaks/vocab";
|
|
52
|
+
import type { Store } from "@yaks/sqlite";
|
|
53
|
+
import { type Found } from "./searching.js";
|
|
54
|
+
import { type Hit } from "@yaks/fts";
|
|
55
|
+
import { type Config } from "./config.js";
|
|
56
|
+
import { type Binding, type Load } from "@yaks/host";
|
|
57
|
+
export { every } from "@yaks/host/roles";
|
|
58
|
+
export { ROLES } from "./roles.js";
|
|
59
|
+
import type { Command, Ctx } from "./run.js";
|
|
60
|
+
import { type Thread } from "@yaks/threads";
|
|
61
|
+
export type { Thread } from "@yaks/threads";
|
|
62
|
+
import { type Asker } from "@yaks/graph/asker";
|
|
63
|
+
import { type Clock } from "@yaks/fp";
|
|
64
|
+
export { type Declared, facet, type Words, words } from "./words.js";
|
|
65
|
+
export { type Config, configPath, given, type Options, person, type Plug, read, used } from "./config.js";
|
|
66
|
+
import type { Host } from "@yaks/host";
|
|
67
|
+
export type { Feed, Host } from "@yaks/host";
|
|
68
|
+
/** A role: one of {@link ROLES}, or a plugin's package, for its service. */ export type Role = string;
|
|
69
|
+
/** A plugin's command-line control. It opens the graph but is not a persisted
|
|
70
|
+
* tool call: a password prompt or OAuth attempt cannot be replayed by a
|
|
71
|
+
* server after the terminal process exits. */ export type CliCommand = Omit<Command, 'run'> & {
|
|
72
|
+
run: (args: Record<string, unknown>, host: Host, context: Ctx) => number | Promise<number>;
|
|
73
|
+
};
|
|
74
|
+
/** `<plugin>/cli` — commands for the person at this terminal, not graph tools. */ export type CliFacet = {
|
|
75
|
+
commands?: CliCommand[];
|
|
76
|
+
/** Explicit global-input bindings for this plugin's graph tools. */ globals?: Record<string, NonNullable<Command['globals']>>;
|
|
77
|
+
/** Local tool invocations that can finish without opening a graph. Undefined
|
|
78
|
+
* delegates to the ordinary tool runner. Arguments are already validated. */ tools?: Record<string, (args: Record<string, unknown>, context: Ctx) => number | undefined | Promise<number | undefined>>;
|
|
79
|
+
};
|
|
80
|
+
/** An assembled host: everything a plugin factory was given, plus what only
|
|
81
|
+
* the caller of {@link compose} needs. */ export type Served = Host & {
|
|
82
|
+
storage: Omit<Store, keyof Storage> & Storage;
|
|
83
|
+
/** The file's upkeep on this connection. File hosts lend this only to
|
|
84
|
+
* their dedicated upkeep thread; memory has no second connection. */ upkeep: (signal: AbortSignal, report: (error: unknown, work: string) => void) => Promise<void>;
|
|
85
|
+
/** the text half of {@link Host.search}: the best `count` text hits for the
|
|
86
|
+
* words, read here, where the search tool searches at all */ hits?: (words: string, count: number) => Hit[];
|
|
87
|
+
/** the rest of {@link Host.search}: the best `limit` of what its halves
|
|
88
|
+
* found, read and said as hit lines */ said?: (words: string, found: Found, limit: number) => Promise<Bundle[]>;
|
|
89
|
+
/** wind down, with the graph still open: {@link Host.stopping} aborts, so
|
|
90
|
+
* the duties stop and whatever hangs off it ends — a server stops taking
|
|
91
|
+
* requests and answers the ones in flight, a transcript starts no new step —
|
|
92
|
+
* and it leaves the pool, so what is running can finish and be written
|
|
93
|
+
* before {@link close} */ stop: () => void;
|
|
94
|
+
/** close the graph, once the effects it started have finished: every call
|
|
95
|
+
* this process's runner is still running ended as interrupted, every lease
|
|
96
|
+
* it holds released and its `exit` stamped —
|
|
97
|
+
* with the code it is given, or with none where nobody knows how it ended.
|
|
98
|
+
* Await it when the process is about to end, or that last write races the
|
|
99
|
+
* exit and the row reads as still running forever. */ close: (code?: number) => void | Promise<void>;
|
|
100
|
+
};
|
|
101
|
+
/** How a host is composed, beyond its roles. */ export type ComposeOpts = {
|
|
102
|
+
/** The config file this host was read from, which a restart it is asked
|
|
103
|
+
* for reads the box's roles from. */ path?: string;
|
|
104
|
+
/** Open SQLite read-only and record no process or tool-call bookkeeping. A
|
|
105
|
+
* reader never changes the schema; every other host brings the file to its
|
|
106
|
+
* composed schema as it opens (@yaks/sqlite `follow`). */ readOnly?: boolean;
|
|
107
|
+
/** the thread running the duties this host hands off */ thread?: Thread;
|
|
108
|
+
/** The read door of a web or worker; this host closes an owned reader
|
|
109
|
+
* before telemetry. */ reader?: NonNullable<Host['reader']> & {
|
|
110
|
+
close?: () => void | Promise<void>;
|
|
111
|
+
/** where the reader tells of a read that runs on, and who asked it */ overrun?: (tell: (error: Error, asker?: Asker) => void) => void;
|
|
112
|
+
};
|
|
113
|
+
/** what the host carries as {@link Host.warm} */ warm?: () => Promise<void>;
|
|
114
|
+
/** a reader beside a host records no process of its own */ process?: boolean;
|
|
115
|
+
/** Open the graph as of a transaction, or on a branch, where its store
|
|
116
|
+
* keeps history (D-130964): read only as of a transaction, writing only to
|
|
117
|
+
* the branch on one. Default: `$YAK_AT` or `$YAK_BRANCH`, else main. */ mode?: {
|
|
118
|
+
at: number;
|
|
119
|
+
} | {
|
|
120
|
+
branch: number;
|
|
121
|
+
};
|
|
122
|
+
/** The clock the host keeps: its graph's and its runner's (@yaks/host
|
|
123
|
+
* `Binding.clock`), and its own waits, a process write storage refused and
|
|
124
|
+
* a drain step's warning (default the runtime's). */ clock?: Clock;
|
|
125
|
+
/** The graph's own words, loaded after its plugins', each component
|
|
126
|
+
* shadowing a plugin's of the same name (@yaks/host `AssemblyOpts.docs`):
|
|
127
|
+
* an app's vocab.json. A config's graph has none. */ docs?: VocabDoc[];
|
|
128
|
+
/** The graph's own commands, offered beside this host's operations: an
|
|
129
|
+
* app's, which its vocab.json declares (@yaks/platform `released`). A
|
|
130
|
+
* config's graph has none. */ tools?: (host: Host) => NamedTool[];
|
|
131
|
+
/** What each plugin is given beside its configured options (@yaks/host
|
|
132
|
+
* `Binding.options`): what only the caller can lend it. */ options?: Binding['options'];
|
|
133
|
+
};
|
|
134
|
+
export { dbOf } from "./config.js";
|
|
135
|
+
/**
|
|
136
|
+
* Who a host writes as when no request named a caller: nobody, through this
|
|
137
|
+
* PROCESS. A process is an instrument, never an actor, so it stands in `via`
|
|
138
|
+
* alone, the way a session does (M-31958).
|
|
139
|
+
*
|
|
140
|
+
* There is no configured actor name. A run of a program is not a singleton and
|
|
141
|
+
* never was — two `yak` commands and a `yak serve` over one file are three
|
|
142
|
+
* writers — so the instrument is the `process` row this run wrote on the way in
|
|
143
|
+
* (@yaks/process `started`). That makes `created.via` the answer to *which run*
|
|
144
|
+
* wrote a thing, and lets a child process's row, written by its parent, record
|
|
145
|
+
* whose child it is without needing a property for it.
|
|
146
|
+
*
|
|
147
|
+
* A graph whose vocabulary has no `process` component has no such row, and
|
|
148
|
+
* writes go unattributed rather than attributed to an id nothing created.
|
|
149
|
+
*/ export declare let writer: (vocab: Vocab) => Actor | null;
|
|
150
|
+
/**
|
|
151
|
+
* Open the graph a config names, for the roles this process serves: import
|
|
152
|
+
* those roles' facets and nothing else, open the database, build the graph, and
|
|
153
|
+
* wire in what each role brings — the code behind the effects, and the worker
|
|
154
|
+
* that runs them, for `effects`; the request handler for `web`; a plugin's
|
|
155
|
+
* service for the role named by its package. Every process serves `graph`,
|
|
156
|
+
* since the graph is what it opened.
|
|
157
|
+
*
|
|
158
|
+
* `load` is how one of a plugin's subpaths becomes a module ({@link facet}).
|
|
159
|
+
* It is injectable, so a test can assemble a host from modules it wrote inline
|
|
160
|
+
* rather than files on disk.
|
|
161
|
+
*/ export declare let compose: (config: Config, roles: readonly Role[], load?: Load, opts?: ComposeOpts) => Promise<Served>;
|
|
162
|
+
export type { Reader } from "./reader.js";
|
|
163
|
+
export declare let reader: (...args: Parameters<typeof import("./reader.js").reader>) => Promise<import("./reader.js").Reader>;
|
|
164
|
+
//# sourceMappingURL=host.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host.d.ts","sources":["../host.ts"],"names":[],"mappings":"AAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiDC,GAED,cACE,KAAK,EACL,MAAM,EAIN,SAAS,EACT,OAAO,2BACsB;AAG/B,cAAc,KAAK,EAAE,QAAQ,2BAAgC;AAG7D,cAAuB,KAAK,4BAAiC;AAS7D,SAAS,KAAK,KAAK,yBAAmC;AAEtD,SAIE,KAAK,GAAG,yBAQmB;AAU7B,SAAS,KAAK,MAAM,sBAAwC;AAW5D,SAEE,KAAK,OAAO,EAEZ,KAAK,IAAI,0BAEmB;AAC9B,SAAS,KAAK,gCAAqC;AAGnD,SAAS,KAAK,qBAAoB;AAGlC,cAAc,OAAO,EAAE,GAAG,mBAAkB;AAC5C,SAA8B,KAAK,MAAM,6BAAkC;AAC3E,cAAc,MAAM,6BAAkC;AAKtD,SAAS,KAAK,KAAK,iCAAoD;AAOvE,SAAS,KAAK,KAA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