@inventarch/workspace-runtime 3.1.0 → 3.2.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/LANGUAGE.md +2 -2
- package/README.md +77 -4
- package/SPEC.md +53 -9
- package/dist/authoring-manifest.js +1 -1
- package/dist/authoring-manifest.js.map +1 -1
- package/dist/bind.d.ts +10 -11
- package/dist/bind.d.ts.map +1 -1
- package/dist/bind.js +1 -1
- package/dist/bind.js.map +1 -1
- package/dist/generate/agent-profile.d.ts.map +1 -1
- package/dist/generate/agent-profile.js +27 -30
- package/dist/generate/agent-profile.js.map +1 -1
- package/dist/generate/definitions.d.ts +7 -7
- package/dist/generate/definitions.js +9 -9
- package/dist/generate/definitions.js.map +1 -1
- package/dist/generate/format.d.ts +12 -14
- package/dist/generate/format.d.ts.map +1 -1
- package/dist/generate/format.js +13 -14
- package/dist/generate/format.js.map +1 -1
- package/dist/generate/hook.d.ts +6 -7
- package/dist/generate/hook.d.ts.map +1 -1
- package/dist/generate/hook.js +6 -7
- package/dist/generate/hook.js.map +1 -1
- package/dist/generate/index.d.ts.map +1 -1
- package/dist/generate/index.js +1 -2
- package/dist/generate/index.js.map +1 -1
- package/dist/generate/playbook.d.ts.map +1 -1
- package/dist/generate/playbook.js +5 -8
- package/dist/generate/playbook.js.map +1 -1
- package/dist/record-fields.d.ts +4 -4
- package/dist/record-fields.js +4 -4
- package/dist/resource-files.js +1 -1
- package/dist/resource-files.js.map +1 -1
- package/dist/resources.js +1 -1
- package/dist/resources.js.map +1 -1
- package/package.json +9 -9
|
@@ -4,34 +4,32 @@ import { claudeProseCatalog, nativeValue, PROSE_EFFECT_TOOLS } from '../projecti
|
|
|
4
4
|
import { frozen } from '../resource-format.js';
|
|
5
5
|
import { authoredOf, capabilityClosure, closureRefusal, code, fieldsOf, inline, knownHost, list, perRecord, prose, safeName, section, stated, textsAt, valuesAt, } from './format.js';
|
|
6
6
|
/**
|
|
7
|
-
* Generation of host agent files from authored `@agent-profile` records
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* tools
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* effects, which the composition compiler holds as the ceiling of what each includes (review finding A-RC5).
|
|
7
|
+
* Generation of host agent files from authored `@agent-profile` records. Each band-100 profile in the scope renders one
|
|
8
|
+
* claude agent file, `.claude/agents/<profile name>.md`: YAML frontmatter naming the profile, describing it and listing
|
|
9
|
+
* the host tools its capabilities allow, the packet's marker on its own line, then the profile's mandate bounds, voice,
|
|
10
|
+
* tools and delegates, read from the records the profile's own fields reference. The Tools section lists the profile's
|
|
11
|
+
* capabilities and every one they include (`composition.includes`); the frontmatter's tools are the profile's own
|
|
12
|
+
* capabilities' effects, which the composition compiler holds as the ceiling of what each includes.
|
|
14
13
|
*
|
|
15
14
|
* A profile is not rendered, and is reported as an unsupported row naming it and the reason, when its name is not a
|
|
16
|
-
* portable host name, when its capabilities allow no host tool (claude reads an agent with no tool list as one given
|
|
17
|
-
* tool, so only a file left unwritten grants nothing), when the compiler would refuse its capability closure (an
|
|
15
|
+
* portable host name, when its capabilities allow no host tool (claude reads an agent with no tool list as one given
|
|
16
|
+
* every tool, so only a file left unwritten grants nothing), when the compiler would refuse its capability closure (an
|
|
18
17
|
* inclusion cycle, or an included capability with effects its includer does not declare), or when its text, an authored
|
|
19
|
-
* value's own or as rendered, is not inert prose. Codex renders none and reports
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
18
|
+
* value's own or as rendered, is not inert prose. Codex renders none and reports each: a codex agent needs an entry in
|
|
19
|
+
* `.codex/config.toml`, which holds the owned MCP block. A profile below band 100, an installed or adopted base,
|
|
20
|
+
* renders nothing, and no system steward does, a steward being an `@agent`; a workspace that authors public systems, as
|
|
21
|
+
* this repository does, renders their profiles. The bytes are a function of the scope's records alone: no absolute
|
|
22
|
+
* path, time or scope token is written.
|
|
24
23
|
*
|
|
25
24
|
* The mandate bounds are the profile's own `composition.mandate`. A profile that names none falls back to the authored
|
|
26
|
-
* mandates
|
|
27
|
-
* selects
|
|
28
|
-
* workspace participant or steward. A participant-less mandate that states neither
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
25
|
+
* mandates the runtime's mandate resolver (`governingMandates`) says bind its `composition.agent`: the agent a subagent
|
|
26
|
+
* acts as for edits the guard selects, so the file states what the guard enforces; CLI commands independently choose a
|
|
27
|
+
* workspace participant or steward. A participant-less mandate that states neither scope nor covers locates nowhere
|
|
28
|
+
* and is left out. The fallback is resolved only for a rendered profile that needs it, and a mandate the resolver
|
|
29
|
+
* cannot read makes it unavailable, which the file says, never failing the render. A profile's own mandate that names
|
|
30
|
+
* another participant is rendered with a line saying the guard does not judge this agent by it.
|
|
32
31
|
*
|
|
33
|
-
* Nothing applies these files
|
|
34
|
-
* projection writer.
|
|
32
|
+
* Nothing here applies these files: `generateHostSet` hands them to the one projection writer.
|
|
35
33
|
*/
|
|
36
34
|
/**
|
|
37
35
|
* The claude host's tool names by tool id, the prose catalog's default selections. The generated files carry no profile
|
|
@@ -74,14 +72,14 @@ export function generateAgentProfiles(reader, within, host) {
|
|
|
74
72
|
};
|
|
75
73
|
/** A reference printed as the identity it resolves to, or as authored when none admitted answers it. */
|
|
76
74
|
const named = (value) => code(target(value)?.identity ?? nativeValue(value));
|
|
77
|
-
/**
|
|
75
|
+
/** The fallback for a profile naming no mandate: the authored mandates that bind `agent`, or why there are none. */
|
|
78
76
|
const fallback = (agent) => {
|
|
79
77
|
const intro = 'This profile names no mandate.';
|
|
80
78
|
if (agent?.discriminator !== 'agent')
|
|
81
79
|
return [`${intro} Fallback unavailable: its composition.agent is not an admitted @agent in this scope.`];
|
|
82
80
|
try {
|
|
83
81
|
// A mandate that names no participant and neither scope nor covers locates nowhere, so it governs no path the
|
|
84
|
-
// agent edits: it is left out
|
|
82
|
+
// agent edits: it is left out.
|
|
85
83
|
const binding = governingMandates(reader, within, { actor: agent.identity }).filter((mandate) => mandate.binds !== false &&
|
|
86
84
|
(mandate.participant !== undefined || mandate.scope.length > 0 || (mandate.covers ?? []).length > 0));
|
|
87
85
|
if (binding.length === 0)
|
|
@@ -103,7 +101,7 @@ export function generateAgentProfiles(reader, within, host) {
|
|
|
103
101
|
return perRecord('agent-profile', profiles, (profile) => {
|
|
104
102
|
const path = `.claude/agents/${safeName(profile.name)}.md`, roots = valuesAt(profile, 'composition.capabilities'), capabilities = capabilityClosure(roots, target), refused = closureRefusal(roots, target);
|
|
105
103
|
// A closure the composition compiler refuses is reported; otherwise each capability's own effects are the ceiling of
|
|
106
|
-
// what it includes, so the profile's capabilities' own effects are its tools
|
|
104
|
+
// what it includes, so the profile's capabilities' own effects are its tools.
|
|
107
105
|
if (refused !== undefined)
|
|
108
106
|
inputFailure(`${profile.identity} renders no agent: ${refused}, which the composition compiler refuses`);
|
|
109
107
|
const tools = hostTools(roots.flatMap((capability) => {
|
|
@@ -123,7 +121,7 @@ export function generateAgentProfiles(reader, within, host) {
|
|
|
123
121
|
function agentFile(profile, tools, roots, capabilities, target, named, fallback) {
|
|
124
122
|
const agent = valuesAt(profile, 'composition.agent')[0], agentNode = agent === undefined ? undefined : target(agent), says = textsAt(profile, 'meaning.says')[0];
|
|
125
123
|
// The description is the agent's own only when the workspace authors that agent: an installed or adopted base's text
|
|
126
|
-
// never decides when claude delegates to an authored profile
|
|
124
|
+
// never decides when claude delegates to an authored profile.
|
|
127
125
|
const description = (agentNode !== undefined && agentNode.band === 100 ? textsAt(agentNode, 'meaning.says')[0] : undefined) ??
|
|
128
126
|
says ??
|
|
129
127
|
'';
|
|
@@ -148,7 +146,7 @@ function agentFile(profile, tools, roots, capabilities, target, named, fallback)
|
|
|
148
146
|
'',
|
|
149
147
|
"CLI commands choose an authored workspace participant or steward. Omitting --actor uses the workspace's default actor; it does not select this profile's agent.",
|
|
150
148
|
];
|
|
151
|
-
// The mandate bounds: the authority and limits of the mandate the profile itself names, else
|
|
149
|
+
// The mandate bounds: the authority and limits of the mandate the profile itself names, else the resolver's fallback.
|
|
152
150
|
const mandate = valuesAt(profile, 'composition.mandate')[0], mandateNode = mandate === undefined ? undefined : target(mandate);
|
|
153
151
|
out.push(...section('Mandate', mandate === undefined
|
|
154
152
|
? fallback(agentNode)
|
|
@@ -204,9 +202,8 @@ function mandateLines(mandate, named) {
|
|
|
204
202
|
return [`- ${code(mandate.identity)}`, ...fields.map((line) => ` - ${line}`)];
|
|
205
203
|
}
|
|
206
204
|
/**
|
|
207
|
-
* The profile's own mandate names another participant than the profile's agent: its bounds are rendered as
|
|
208
|
-
* and a nested line says the edit guard does not judge this agent by it
|
|
209
|
-
* A-RC4).
|
|
205
|
+
* The profile's own mandate names another participant than the profile's agent: its bounds are rendered as authored,
|
|
206
|
+
* and a nested line says the edit guard does not judge this agent by it.
|
|
210
207
|
*/
|
|
211
208
|
function otherParticipant(mandate, agent, target) {
|
|
212
209
|
const participant = valuesAt(mandate, 'authority.participant')[0], bound = participant === undefined ? undefined : target(participant);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"agent-profile.js","sourceRoot":"","sources":["../../src/generate/agent-profile.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAErF,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC5F,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EACL,UAAU,EACV,iBAAiB,EACjB,cAAc,EACd,IAAI,EACJ,QAAQ,EACR,MAAM,EACN,SAAS,EACT,IAAI,EACJ,SAAS,EACT,KAAK,EACL,QAAQ,EACR,OAAO,EACP,MAAM,EACN,OAAO,EACP,QAAQ,GACT,MAAM,aAAa,CAAC;AAGrB
|
|
1
|
+
{"version":3,"file":"agent-profile.js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C,WAAW,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;IACrG,OAAO,CAAC,KAAK,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,EAAE,GAAG,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,IAAI,EAAE,CAAC,CAAC,CAAC;AACjF,CAAC;AAED;;;GAGG;AACH,SAAS,gBAAgB,CACvB,OAAa,EACb,KAAuB,EACvB,MAAkD;IAElD,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,EAAE,uBAAuB,CAAC,CAAC,CAAC,CAAC,EAC/D,KAAK,GAAG,WAAW,KAAK,SAAS,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC,CAAC;IACtE,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,QAAQ,KAAK,KAAK,CAAC,QAAQ;QAAE,OAAO,EAAE,CAAC;IAC/F,OAAO;QACL,aAAa,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,8BAA8B,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,gEAAgE;KACpJ,CAAC;AACJ,CAAC"}
|
|
@@ -2,11 +2,11 @@ import type { ReadHandle } from '@inventarch/db';
|
|
|
2
2
|
import type { HostHookDeclaration, PacketDefinition, PacketHost } from '@inventarch/runtime';
|
|
3
3
|
import type { GeneratedFile, UnsupportedRecord } from './format.js';
|
|
4
4
|
/**
|
|
5
|
-
* Everything a host generates from the workspace's authored records, computed once
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
5
|
+
* Everything a host generates from the workspace's authored records, computed once: the agent and skill files, the
|
|
6
|
+
* hook declarations it registers, a row for each authored record it does not render or register, and the operation and
|
|
7
|
+
* harness definitions, whose harness registration sets select only from these files and hooks. The projection writer
|
|
8
|
+
* applies exactly this set, and its receipt lists each harness's registrations as that apply left them (a hook it
|
|
9
|
+
* registered no group for is not listed).
|
|
10
10
|
*/
|
|
11
11
|
export interface HostSet {
|
|
12
12
|
/** The generated agent files, then the skills, each group by identity. */
|
|
@@ -19,8 +19,8 @@ export interface HostSet {
|
|
|
19
19
|
/** The host set for `host` through the scope token `within` (see `HostSet`). */
|
|
20
20
|
export declare function generateHostSet(reader: ReadHandle, within: string, host: PacketHost): HostSet;
|
|
21
21
|
/**
|
|
22
|
-
* Definitions of authored `@operation` and `@harness` records
|
|
23
|
-
*
|
|
22
|
+
* Definitions of authored `@operation` and `@harness` records, for the receipt's `definitions` section:
|
|
23
|
+
* `generateHostSet`'s.
|
|
24
24
|
*/
|
|
25
25
|
export declare function generateDefinitions(reader: ReadHandle, within: string, host: PacketHost): readonly PacketDefinition[];
|
|
26
26
|
//# sourceMappingURL=definitions.d.ts.map
|
|
@@ -15,20 +15,20 @@ export function generateHostSet(reader, within, host) {
|
|
|
15
15
|
});
|
|
16
16
|
}
|
|
17
17
|
/**
|
|
18
|
-
* Definitions of authored `@operation` and `@harness` records
|
|
19
|
-
*
|
|
18
|
+
* Definitions of authored `@operation` and `@harness` records, for the receipt's `definitions` section:
|
|
19
|
+
* `generateHostSet`'s.
|
|
20
20
|
*/
|
|
21
21
|
export function generateDefinitions(reader, within, host) {
|
|
22
22
|
return generateHostSet(reader, within, host).definitions;
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
25
|
* An operation's `execution.handler`, `input` and `output` are catalog keys an installed implementation answers, copied
|
|
26
|
-
* as authored: nothing here imports, resolves, serves or executes them
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
26
|
+
* as authored: nothing here imports, resolves, serves or executes them. A harness lists the registration set its
|
|
27
|
+
* profiles and bindings select among `files` and `hooks`: the agent files rendered for its profiles, the skills
|
|
28
|
+
* rendered for the playbooks their capabilities and every capability those include name, and the registered hooks its
|
|
29
|
+
* bindings target. A record that renders or registers nothing for the host (an unsupported one, or any agent or hook
|
|
30
|
+
* for codex) selects nothing, so hook or agent support never fails the definitions. Only authored (band 100) records
|
|
31
|
+
* are defined.
|
|
32
32
|
*/
|
|
33
33
|
function definitionsOf(reader, within, files, hooks) {
|
|
34
34
|
const records = reader.records({ within }), nodes = new Map(records.map((node) => [node.identity, node]));
|
|
@@ -63,7 +63,7 @@ function definitionsOf(reader, within, files, hooks) {
|
|
|
63
63
|
const profile = nodes.get(id);
|
|
64
64
|
if (profile === undefined)
|
|
65
65
|
continue;
|
|
66
|
-
// A closure the composition compiler refuses selects nothing
|
|
66
|
+
// A closure the composition compiler refuses selects nothing.
|
|
67
67
|
const roots = valuesAt(profile, 'composition.capabilities');
|
|
68
68
|
if (closureRefusal(roots, target) !== undefined)
|
|
69
69
|
continue;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/generate/definitions.ts"],"names":[],"mappings":"AAUA,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,cAAc,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE1G,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAiB5C,gFAAgF;AAChF,MAAM,UAAU,eAAe,CAAC,MAAkB,EAAE,MAAc,EAAE,IAAgB;IAClF,SAAS,CAAC,IAAI,CAAC,CAAC;IAChB,MAAM,MAAM,GAAG,qBAAqB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EACxD,MAAM,GAAG,sBAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EACrD,KAAK,GAAG,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,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AE,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;gBAC9G,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC;gBAC9G,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aAC3D;SACF,CAAC;QACF,OAAO,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC;IAClE,CAAC,CAAC;IACF,OAAO,MAAM,CAAC,CAAC,GAAG,UAAU,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,GAAG,UAAU,CAAC,OAAO,EAAE,SAAS,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AACtH,CAAC"}
|
|
@@ -2,10 +2,9 @@ import type { Node } from '@inventarch/graph';
|
|
|
2
2
|
import type { CompiledValue } from '@inventarch/language';
|
|
3
3
|
import type { DefinitionWord, GeneratedFileWord, GeneratedRecordWord, PacketHost, UnsupportedRow } from '@inventarch/runtime';
|
|
4
4
|
/**
|
|
5
|
-
* What the host generators share
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* with.
|
|
5
|
+
* What the host generators share: the generated file and the unsupported row they return, the per-record rendering
|
|
6
|
+
* that reports a record instead of failing the others, the host and name checks, the authored records they render, the
|
|
7
|
+
* capability closure, and the field readers and text helpers their bodies are written with.
|
|
9
8
|
*/
|
|
10
9
|
/** The words a generator renders records of: runtime's unions, stated once there. */
|
|
11
10
|
export type GeneratedWord = GeneratedRecordWord | DefinitionWord;
|
|
@@ -37,9 +36,9 @@ export declare function safeName(name: string): string;
|
|
|
37
36
|
export declare const authoredOf: (records: readonly Node[], word: GeneratedWord) => readonly Node[];
|
|
38
37
|
/**
|
|
39
38
|
* Render each record with `render`, in order. A record `render` or its text refuses with an IA-PROJECTION-* error is
|
|
40
|
-
* not rendered and becomes an unsupported row naming the record and the reason, and the others still render
|
|
41
|
-
*
|
|
42
|
-
*
|
|
39
|
+
* not rendered and becomes an unsupported row naming the record and the reason, and the others still render. Every
|
|
40
|
+
* rendered text must be inert prose (projection-host's `inert`: no executable dynamic context, no active HTML), as the
|
|
41
|
+
* prose projector requires of the same records. Any other error still fails.
|
|
43
42
|
*/
|
|
44
43
|
export declare function perRecord(word: UnsupportedRecord['word'], nodes: readonly Node[], render: (node: Node) => GeneratedFile): GeneratedSet;
|
|
45
44
|
/**
|
|
@@ -49,9 +48,9 @@ export declare function perRecord(word: UnsupportedRecord['word'], nodes: readon
|
|
|
49
48
|
*/
|
|
50
49
|
export declare function capabilityClosure(roots: readonly CompiledValue[], target: (value: CompiledValue) => Node | undefined): readonly Node[];
|
|
51
50
|
/**
|
|
52
|
-
* Why the composition compiler refuses a profile's capability closure, or undefined when it does not
|
|
53
|
-
*
|
|
54
|
-
*
|
|
51
|
+
* Why the composition compiler refuses a profile's capability closure, or undefined when it does not: an inclusion
|
|
52
|
+
* cycle, or an included capability whose effects its includer does not declare (the compiler holds each capability to
|
|
53
|
+
* its own `execution.effects` as a ceiling over what it includes).
|
|
55
54
|
*/
|
|
56
55
|
export declare function closureRefusal(roots: readonly CompiledValue[], target: (value: CompiledValue) => Node | undefined): string | undefined;
|
|
57
56
|
import { fieldsOf, stated, textsAt, valuesAt } from '../record-fields.js';
|
|
@@ -62,10 +61,9 @@ export declare const inline: (text: string) => string;
|
|
|
62
61
|
export declare const code: (text: string) => string;
|
|
63
62
|
/**
|
|
64
63
|
* Authored free text for a Markdown body: on one line, each bare IA word token a code span as the packet writes it
|
|
65
|
-
* (runtime's `prose
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
* value opens an HTML block (A-RC3).
|
|
64
|
+
* (runtime's `prose`); a `!` that a code span the rendering opened would follow is written `!`, so no rendered span
|
|
65
|
+
* reads as dynamic context; every `<!--` is written `<!--`, so no authored value opens an HTML comment that hides
|
|
66
|
+
* what follows or reads as a marker line; and a leading `<` is written `<`, so no value opens an HTML block.
|
|
69
67
|
*/
|
|
70
68
|
export declare const prose: (text: string) => string;
|
|
71
69
|
/** A list's items, comma-separated, or `none`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/generate/format.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACnB,UAAU,EACV,cAAc,EACf,MAAM,qBAAqB,CAAC;AAU7B
|
|
1
|
+
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/generate/format.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,KAAK,EACV,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACnB,UAAU,EACV,cAAc,EACf,MAAM,qBAAqB,CAAC;AAU7B;;;;GAIG;AAEH,qFAAqF;AACrF,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG,cAAc,CAAC;AACjE,yDAA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S,GACjD,MAAM,GAAG,SAAS,CA4BpB;AAGD,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC;AAa/C,wGAAwG;AACxG,eAAO,MAAM,MAAM,GAAI,MAAM,MAAM,KAAG,MAA6C,CAAC;AACpF,4EAA4E;AAC5E,eAAO,MAAM,IAAI,GAAI,MAAM,MAAM,KAAG,MAAiC,CAAC;AAUtE;;;;;GAKG;AACH,eAAO,MAAM,KAAK,GAAI,MAAM,MAAM,KAAG,MAIX,CAAC;AAC3B,kDAAkD;AAClD,eAAO,MAAM,IAAI,GAAI,OAAO,SAAS,MAAM,EAAE,KAAG,MAA0D,CAAC;AAC3G,eAAO,MAAM,OAAO,GAAI,SAAS,MAAM,EAAE,OAAO,SAAS,MAAM,EAAE,KAAG,SAAS,MAAM,EAKlF,CAAC"}
|
package/dist/generate/format.js
CHANGED
|
@@ -28,9 +28,9 @@ export const authoredOf = (records, word) => records
|
|
|
28
28
|
.sort((a, b) => (a.identity < b.identity ? -1 : a.identity > b.identity ? 1 : 0));
|
|
29
29
|
/**
|
|
30
30
|
* Render each record with `render`, in order. A record `render` or its text refuses with an IA-PROJECTION-* error is
|
|
31
|
-
* not rendered and becomes an unsupported row naming the record and the reason, and the others still render
|
|
32
|
-
*
|
|
33
|
-
*
|
|
31
|
+
* not rendered and becomes an unsupported row naming the record and the reason, and the others still render. Every
|
|
32
|
+
* rendered text must be inert prose (projection-host's `inert`: no executable dynamic context, no active HTML), as the
|
|
33
|
+
* prose projector requires of the same records. Any other error still fails.
|
|
34
34
|
*/
|
|
35
35
|
export function perRecord(word, nodes, render) {
|
|
36
36
|
const files = [], unsupported = [];
|
|
@@ -67,9 +67,9 @@ export function capabilityClosure(roots, target) {
|
|
|
67
67
|
return [...reached.values()];
|
|
68
68
|
}
|
|
69
69
|
/**
|
|
70
|
-
* Why the composition compiler refuses a profile's capability closure, or undefined when it does not
|
|
71
|
-
*
|
|
72
|
-
*
|
|
70
|
+
* Why the composition compiler refuses a profile's capability closure, or undefined when it does not: an inclusion
|
|
71
|
+
* cycle, or an included capability whose effects its includer does not declare (the compiler holds each capability to
|
|
72
|
+
* its own `execution.effects` as a ceiling over what it includes).
|
|
73
73
|
*/
|
|
74
74
|
export function closureRefusal(roots, target) {
|
|
75
75
|
const done = new Set(), open = new Set();
|
|
@@ -111,9 +111,9 @@ export { fieldsOf, stated, textsAt, valuesAt };
|
|
|
111
111
|
// Built from strings: the class names the control characters themselves.
|
|
112
112
|
const CONTROLS = new RegExp('[\\u0000-\\u0008\\u000b\\u000c\\u000e-\\u001f\\u007f-\\u009f\\u061c\\u200e\\u200f\\u2028\\u2029\\u202a-\\u202e\\u2066-\\u2069]', 'g');
|
|
113
113
|
/**
|
|
114
|
-
* Authored text as a generated file may hold it
|
|
115
|
-
*
|
|
116
|
-
*
|
|
114
|
+
* Authored text as a generated file may hold it: every C0 or C1 control but tab and the line breaks `inline` folds, the
|
|
115
|
+
* Unicode line and paragraph separators, and the bidirectional controls become a space, so no value can start a YAML or
|
|
116
|
+
* Markdown line, drive a terminal or reorder what a reader sees.
|
|
117
117
|
*/
|
|
118
118
|
const plain = (text) => text.replace(CONTROLS, ' ');
|
|
119
119
|
/** `text` on one line, as the packet writes an entry (runtime's `inline`), its controls made spaces. */
|
|
@@ -123,7 +123,7 @@ export const code = (text) => packetCode(plain(text));
|
|
|
123
123
|
/**
|
|
124
124
|
* An authored value must itself be inert prose (projection-host's `inert`: no executable dynamic context such as
|
|
125
125
|
* `!\`cmd\``, no active HTML, no unbalanced code span or fence), so a record is reported for what its own text holds
|
|
126
|
-
* rather than for what rendering made of it
|
|
126
|
+
* rather than for what rendering made of it. IA-PROJECTION-FEATURE-UNAVAILABLE otherwise.
|
|
127
127
|
*/
|
|
128
128
|
function authored(text) {
|
|
129
129
|
inert(text);
|
|
@@ -131,10 +131,9 @@ function authored(text) {
|
|
|
131
131
|
}
|
|
132
132
|
/**
|
|
133
133
|
* Authored free text for a Markdown body: on one line, each bare IA word token a code span as the packet writes it
|
|
134
|
-
* (runtime's `prose
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
* value opens an HTML block (A-RC3).
|
|
134
|
+
* (runtime's `prose`); a `!` that a code span the rendering opened would follow is written `!`, so no rendered span
|
|
135
|
+
* reads as dynamic context; every `<!--` is written `<!--`, so no authored value opens an HTML comment that hides
|
|
136
|
+
* what follows or reads as a marker line; and a leading `<` is written `<`, so no value opens an HTML block.
|
|
138
137
|
*/
|
|
139
138
|
export const prose = (text) => packetProse(plain(authored(text)))
|
|
140
139
|
.replace(/!(\s*)`/g, '!$1`')
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.js","sourceRoot":"","sources":["../../src/generate/format.ts"],"names":[],"mappings":"AASA,OAAO,EACL,IAAI,IAAI,UAAU,EAClB,MAAM,IAAI,YAAY,EACtB,KAAK,IAAI,WAAW,GACrB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"format.js","sourceRoot":"","sources":["../../src/generate/format.ts"],"names":[],"mappings":"AASA,OAAO,EACL,IAAI,IAAI,UAAU,EAClB,MAAM,IAAI,YAAY,EACtB,KAAK,IAAI,WAAW,GACrB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AA2B/C,+FAA+F;AAC/F,MAAM,QAAQ,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AACd,CAAC;AACD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,IAAY,EAAU,EAAE,CAC5C,WAAW,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;KAC/B,OAAO,CAAC,UAAU,EAAE,UAAU,CAAC;KAC/B,UAAU,CAAC,MAAM,EAAE,SAAS,CAAC;KAC7B,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AAC3B,kDAAkD;AAClD,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,KAAwB,EAAU,EAAE,CAAC,CAAC,KAAK,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC;AAC3G,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,OAAe,EAAE,KAAwB,EAAqB,EAAE,CAAC;IACvF,EAAE;IACF,MAAM,OAAO,EAAE;IACf,EAAE;IACF,GAAG,KAAK;CACT,CAAC"}
|
package/dist/generate/hook.d.ts
CHANGED
|
@@ -12,10 +12,9 @@ export declare const HOOK_IDENTITY: RegExp;
|
|
|
12
12
|
export declare const HOOK_IDENTITY_LIMIT = 512;
|
|
13
13
|
export declare const registrableHook: (identity: unknown) => identity is string;
|
|
14
14
|
/**
|
|
15
|
-
* The bounds a registration holds
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* holds its rows to the same ones.
|
|
15
|
+
* The bounds a registration holds: at most `HOOK_LIMIT` hooks, each with one to `HOOK_SELECTION_LIMIT` selections of
|
|
16
|
+
* at most `HOOK_SELECTION_LENGTH` characters. Generation applies them, so a hook beyond them is an unsupported row
|
|
17
|
+
* rather than a refusal of the whole registration; distribution's hook registration holds its rows to the same ones.
|
|
19
18
|
*/
|
|
20
19
|
export declare const HOOK_LIMIT = 64;
|
|
21
20
|
export declare const HOOK_SELECTION_LIMIT = 64;
|
|
@@ -41,9 +40,9 @@ export interface HookSet {
|
|
|
41
40
|
}
|
|
42
41
|
/**
|
|
43
42
|
* Every authored (band 100) `@hook`, by identity: each one `hookDeclaration` accepts is registered and each one it refuses
|
|
44
|
-
* is reported with its reason, so one unsupported record never blocks the others
|
|
45
|
-
*
|
|
46
|
-
*
|
|
43
|
+
* is reported with its reason, so one unsupported record never blocks the others; past the first `HOOK_LIMIT` accepted
|
|
44
|
+
* hooks, each is reported, since a registration holds no more. Codex hooks are unsupported: codex registers none and
|
|
45
|
+
* reports each.
|
|
47
46
|
*/
|
|
48
47
|
export declare function generateHookSet(reader: ReadHandle, within: string, host: PacketHost): HookSet;
|
|
49
48
|
/** The authored hooks a host registers (`generateHookSet`'s supported ones). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../src/generate/hook.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAI3E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAcrD;;;;;GAKG;AACH,eAAO,MAAM,aAAa,QAA8C,CAAC;AACzE,eAAO,MAAM,mBAAmB,MAAM,CAAC;AACvC,eAAO,MAAM,eAAe,GAAI,UAAU,OAAO,KAAG,QAAQ,IAAI,MACwC,CAAC;AACzG
|
|
1
|
+
{"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../../src/generate/hook.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAEjD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,KAAK,EAAE,mBAAmB,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAI3E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAcrD;;;;;GAKG;AACH,eAAO,MAAM,aAAa,QAA8C,CAAC;AACzE,eAAO,MAAM,mBAAmB,MAAM,CAAC;AACvC,eAAO,MAAM,eAAe,GAAI,UAAU,OAAO,KAAG,QAAQ,IAAI,MACwC,CAAC;AACzG;;;;GAIG;AACH,eAAO,MAAM,UAAU,KAAK,CAAC;AAC7B,eAAO,MAAM,oBAAoB,KAAK,CAAC;AACvC,eAAO,MAAM,qBAAqB,MAAM,CAAC;AACzC;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAAI,MAAM,OAAO,KAAG,IAAI,IAAI,MAWkD,CAAC;AAChH;;;;;;GAMG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,IAAI,GAAG,mBAAmB,CAgC/D;AACD,2GAA2G;AAC3G,MAAM,WAAW,OAAO;IACtB,QAAQ,CAAC,KAAK,EAAE,SAAS,mBAAmB,EAAE,CAAC;IAC/C,QAAQ,CAAC,WAAW,EAAE,SAAS,iBAAiB,EAAE,CAAC;CACpD;AACD;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,OAAO,CAwB7F;AACD,gFAAgF;AAChF,wBAAgB,aAAa,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,SAAS,mBAAmB,EAAE,CAElH"}
|
package/dist/generate/hook.js
CHANGED
|
@@ -22,10 +22,9 @@ export const HOOK_IDENTITY = /^[a-z][a-z0-9-]*(?:\/[a-z][a-z0-9-]*){3}$/;
|
|
|
22
22
|
export const HOOK_IDENTITY_LIMIT = 512;
|
|
23
23
|
export const registrableHook = (identity) => typeof identity === 'string' && identity.length <= HOOK_IDENTITY_LIMIT && HOOK_IDENTITY.test(identity);
|
|
24
24
|
/**
|
|
25
|
-
* The bounds a registration holds
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* holds its rows to the same ones.
|
|
25
|
+
* The bounds a registration holds: at most `HOOK_LIMIT` hooks, each with one to `HOOK_SELECTION_LIMIT` selections of
|
|
26
|
+
* at most `HOOK_SELECTION_LENGTH` characters. Generation applies them, so a hook beyond them is an unsupported row
|
|
27
|
+
* rather than a refusal of the whole registration; distribution's hook registration holds its rows to the same ones.
|
|
29
28
|
*/
|
|
30
29
|
export const HOOK_LIMIT = 64;
|
|
31
30
|
export const HOOK_SELECTION_LIMIT = 64;
|
|
@@ -84,9 +83,9 @@ export function hookDeclaration(node) {
|
|
|
84
83
|
}
|
|
85
84
|
/**
|
|
86
85
|
* Every authored (band 100) `@hook`, by identity: each one `hookDeclaration` accepts is registered and each one it refuses
|
|
87
|
-
* is reported with its reason, so one unsupported record never blocks the others
|
|
88
|
-
*
|
|
89
|
-
*
|
|
86
|
+
* is reported with its reason, so one unsupported record never blocks the others; past the first `HOOK_LIMIT` accepted
|
|
87
|
+
* hooks, each is reported, since a registration holds no more. Codex hooks are unsupported: codex registers none and
|
|
88
|
+
* reports each.
|
|
90
89
|
*/
|
|
91
90
|
export function generateHookSet(reader, within, host) {
|
|
92
91
|
knownHost(host);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hook.js","sourceRoot":"","sources":["../../src/generate/hook.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAGhD,OAAO,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC/C,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAG7D,MAAM,KAAK,GAAG,IAAI,GAAG,CAAC;IACpB,CAAC,OAAO,EAAE,OAAO,CAAC;IAClB,CAAC,MAAM,EAAE,MAAM,CAAC;IAChB,C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AAC,OAAO,KAAK,EAAE,CAAC;YACf,IAAI,CAAC,CAAC,KAAK,YAAY,eAAe,CAAC;gBAAE,MAAM,KAAK,CAAC;YACrD,WAAW,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QACrF,CAAC;IACH,CAAC;IACD,OAAO,MAAM,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,CAAC,CAAC;AACxC,CAAC;AACD,gFAAgF;AAChF,MAAM,UAAU,aAAa,CAAC,MAAkB,EAAE,MAAc,EAAE,IAAgB;IAChF,OAAO,eAAe,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,CAAC,KAAK,CAAC;AACrD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/generate/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/generate/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxE,YAAY,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAChD,OAAO,EACL,aAAa,EACb,eAAe,EACf,aAAa,EACb,mBAAmB,EACnB,UAAU,EACV,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,oBAAoB,GACrB,MAAM,WAAW,CAAC;AACnB,YAAY,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACzC,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACjG,OAAO,EAAE,YAAY,EAAE,KAAK,WAAW,EAAE,KAAK,UAAU,EAAE,KAAK,cAAc,EAAE,MAAM,aAAa,CAAC"}
|
package/dist/generate/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
// Host generators over authored records
|
|
2
|
-
// generateHostSet's set (task host-consumes-generated-set).
|
|
1
|
+
// Host generators over authored records. The CLI's projection writer applies generateHostSet's set.
|
|
3
2
|
export { generateAgentProfiles } from './agent-profile.js';
|
|
4
3
|
export { generatePlaybookSkills } from './playbook.js';
|
|
5
4
|
export { generateDefinitions, generateHostSet } from './definitions.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/generate/index.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/generate/index.ts"],"names":[],"mappings":"AAAA,oGAAoG;AACpG,OAAO,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAExE,OAAO,EACL,aAAa,EACb,eAAe,EACf,aAAa,EACb,mBAAmB,EACnB,UAAU,EACV,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,eAAe,EACf,oBAAoB,GACrB,MAAM,WAAW,CAAC;AAGnB,OAAO,EAAE,YAAY,EAA0D,MAAM,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playbook.d.ts","sourceRoot":"","sources":["../../src/generate/playbook.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAKjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"playbook.d.ts","sourceRoot":"","sources":["../../src/generate/playbook.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAKjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAGtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAwBhD;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,GAAG,YAAY,CAgBzG"}
|
|
@@ -3,21 +3,18 @@ import { PACKET_MARKER } from '@inventarch/runtime';
|
|
|
3
3
|
import { inputFailure } from '../projection-format.js';
|
|
4
4
|
import { authoredOf, code, inline, knownHost, perRecord, prose, safeName, section, textsAt } from './format.js';
|
|
5
5
|
/**
|
|
6
|
-
* Generation of host skills from authored `@playbook` records
|
|
7
|
-
* generation-playbook-skill; plan amendments C6, C8 and C12). Each band-100 playbook in the scope renders one skill,
|
|
6
|
+
* Generation of host skills from authored `@playbook` records. Each band-100 playbook in the scope renders one skill,
|
|
8
7
|
* `.claude/skills/<playbook name>/SKILL.md` for claude and `.agents/skills/<playbook name>/SKILL.md` for codex, with the
|
|
9
8
|
* same text for both: YAML frontmatter naming the playbook and describing it by its `meaning.says`, the packet's marker
|
|
10
9
|
* on its own line, then one section per phase in the cycle order (orient, plan, act, learn) holding the playbook's
|
|
11
10
|
* unconditional and conditional cells, the primary primitive's first. A phase with no cell is left out. A playbook
|
|
12
11
|
* whose name is not a portable host name, that is named as the packet's own `ia-authoring` skill, or whose text is not
|
|
13
12
|
* inert prose is not rendered, and is reported as an unsupported row naming it and the reason; the others still render.
|
|
14
|
-
* A playbook below band 100, an installed or adopted base, renders nothing (
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* time or scope token is written.
|
|
13
|
+
* A playbook below band 100, an installed or adopted base, renders nothing (public and adopted playbooks stay cells
|
|
14
|
+
* that `ia position` delivers), and a workspace that authors public systems, as this repository does, renders their
|
|
15
|
+
* playbooks. The bytes are a function of the playbook's record alone: no absolute path, time or scope token is written.
|
|
18
16
|
*
|
|
19
|
-
* Nothing applies these files
|
|
20
|
-
* projection writer.
|
|
17
|
+
* Nothing here applies these files: `generateHostSet` hands them to the one projection writer.
|
|
21
18
|
*/
|
|
22
19
|
/**
|
|
23
20
|
* The name of the one skill the position packet renders for each host (runtime's packet-host.ts PATHS), which the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playbook.js","sourceRoot":"","sources":["../../src/generate/playbook.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAGhH
|
|
1
|
+
{"version":3,"file":"playbook.js","sourceRoot":"","sources":["../../src/generate/playbook.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAE9C,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAEpD,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AAGhH;;;;;;;;;;;;;GAaG;AAEH;;;GAGG;AACH,MAAM,QAAQ,GAAG,cAAc,CAAC;AAChC,MAAM,MAAM,GAAyC,EAAE,MAAM,EAAE,gBAAgB,EAAE,KAAK,EAAE,gBAAgB,E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,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC;QACpE,4EAA4E;QAC5E,IAAI,KAAK,CAAC,MAAM,GAAG,CAAC;YAClB,GAAG,CAAC,IAAI,CACN,GAAG,OAAO,CAAC,KAAK,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,CACzG,CAAC;IACN,CAAC;IACD,OAAO,GAAG,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;AAC/B,CAAC;AAED,wHAAwH;AACxH,MAAM,QAAQ,GAAG,CAAC,IAAU,EAAU,EAAE,CACtC,KAAK,IAAI,CAAC,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,GACpD,IAAI,CAAC,SAAS,KAAK,SAAS;IAC1B,CAAC,CAAC,EAAE;IACJ,CAAC,CAAC,UAAU,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,GAC3G,KAAK,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC"}
|
package/dist/record-fields.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import type { CompiledField, CompiledRecord } from '@inventarch/language';
|
|
2
2
|
import { fieldsAt, stated, textsAt, valuesAt } from '@inventarch/runtime/internal/packet';
|
|
3
3
|
/**
|
|
4
|
-
* Readers over a compiled record's unconditional fields, shared by the host generators and the execution
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
4
|
+
* Readers over a compiled record's unconditional fields, one copy shared by the host generators and the execution
|
|
5
|
+
* binder. `fieldsAt`, `valuesAt`, `textsAt` and `stated` are runtime's own (packet.ts on `./internal/packet`, the
|
|
6
|
+
* readers the position packet reads records with); `fieldsOf` reads a whole section the same way. A field under a
|
|
7
|
+
* `when` condition is never read: these say what a record states whatever the phase.
|
|
8
8
|
*/
|
|
9
9
|
export { fieldsAt, stated, textsAt, valuesAt };
|
|
10
10
|
/** The unconditional fields of `record`'s `section`, in authored order. */
|