@orkestrel/scaffold 0.0.114 → 0.0.116
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/dist/bin/main.js +137 -15
- package/dist/bin/main.js.map +1 -1
- package/dist/host/agents/orchestration.md +5 -3
- package/dist/host/agents/platforms/windows.md +1 -0
- package/dist/host/agents/skills/orkestrel-align/references/integration.md +1 -1
- package/dist/host/agents/skills/orkestrel-debrief/SKILL.md +4 -4
- package/dist/host/agents/skills/orkestrel-dispatch/SKILL.md +4 -1
- package/dist/host/agents/skills/orkestrel-falsify/SKILL.md +8 -2
- package/dist/host/agents/skills/orkestrel-harden/references/equivalence.md +1 -0
- package/dist/host/agents/skills/orkestrel-harden/references/hardening.md +1 -1
- package/dist/host/agents/skills/orkestrel-parallel/SKILL.md +1 -1
- package/dist/host/agents/skills/orkestrel-parallel/references/codex.md +1 -0
- package/dist/host/agents/skills/orkestrel-publish/references/wave.md +9 -3
- package/dist/host/claude/agents/analyst.md +1 -1
- package/dist/host/claude/agents/astra.md +2 -2
- package/dist/host/claude/agents/builder.md +4 -4
- package/dist/host/claude/agents/opus.md +3 -3
- package/dist/host/claude/agents/orkestrel.md +5 -7
- package/dist/host/claude/agents/planner.md +8 -2
- package/dist/host/claude/rules/campaign.md +2 -1
- package/dist/host/claude/rules/documentation.md +1 -0
- package/dist/host/claude/rules/names.md +3 -1
- package/dist/host/claude/rules/tests.md +7 -4
- package/dist/host/claude/rules/writing.md +1 -0
- package/dist/host/claude/skills/enterprise-bootstrap/SKILL.md +1 -2
- package/dist/host/claude/skills/orkestrel-align/SKILL.md +1 -1
- package/dist/host/claude/skills/orkestrel-build/SKILL.md +1 -2
- package/dist/host/claude/skills/orkestrel-debrief/SKILL.md +1 -2
- package/dist/host/claude/skills/orkestrel-dispatch/SKILL.md +1 -1
- package/dist/host/claude/skills/orkestrel-falsify/SKILL.md +1 -1
- package/dist/host/claude/skills/orkestrel-harden/SKILL.md +1 -1
- package/dist/host/claude/skills/orkestrel-journey/SKILL.md +1 -1
- package/dist/host/claude/skills/orkestrel-parallel/SKILL.md +1 -1
- package/dist/host/claude/skills/orkestrel-polish/SKILL.md +1 -2
- package/dist/host/claude/skills/orkestrel-publish/SKILL.md +1 -2
- package/dist/host/claude/skills/orkestrel-scout/SKILL.md +1 -1
- package/dist/host/codex/agents/analyst.toml +8 -5
- package/dist/host/codex/agents/astra.toml +4 -5
- package/dist/host/codex/agents/builder.toml +5 -5
- package/dist/host/codex/agents/opus.toml +3 -4
- package/dist/host/codex/agents/orkestrel.toml +2 -1
- package/dist/host/codex/agents/planner.toml +8 -5
- package/dist/host/codex/agents/reviewer.toml +5 -4
- package/dist/host/guides/abort.md +17 -17
- package/dist/host/guides/agent.md +445 -445
- package/dist/host/guides/brief.md +143 -143
- package/dist/host/guides/browser.md +731 -731
- package/dist/host/guides/budget.md +39 -39
- package/dist/host/guides/capture.md +298 -298
- package/dist/host/guides/console.md +109 -109
- package/dist/host/guides/contract.md +335 -335
- package/dist/host/guides/csv.md +30 -30
- package/dist/host/guides/database.md +163 -163
- package/dist/host/guides/emitter.md +17 -17
- package/dist/host/guides/form.md +99 -99
- package/dist/host/guides/guide.md +361 -183
- package/dist/host/guides/html.md +49 -49
- package/dist/host/guides/indexeddb.md +40 -40
- package/dist/host/guides/interpret.md +139 -139
- package/dist/host/guides/lsp.md +114 -114
- package/dist/host/guides/markdown.md +68 -68
- package/dist/host/guides/mcp.md +3745 -3745
- package/dist/host/guides/middleware.md +170 -170
- package/dist/host/guides/msg.md +95 -95
- package/dist/host/guides/ndjson.md +8 -8
- package/dist/host/guides/ollama.md +56 -56
- package/dist/host/guides/pool.md +21 -21
- package/dist/host/guides/probe.md +82 -82
- package/dist/host/guides/process.md +99 -99
- package/dist/host/guides/program.md +98 -96
- package/dist/host/guides/qualifier.md +70 -70
- package/dist/host/guides/queue.md +37 -37
- package/dist/host/guides/rater.md +38 -38
- package/dist/host/guides/reason.md +308 -308
- package/dist/host/guides/relation.md +50 -50
- package/dist/host/guides/router.md +58 -58
- package/dist/host/guides/scaffold.md +554 -419
- package/dist/host/guides/sea.md +128 -128
- package/dist/host/guides/server.md +100 -100
- package/dist/host/guides/sqlite.md +28 -28
- package/dist/host/guides/sse.md +20 -20
- package/dist/host/guides/study.md +444 -444
- package/dist/host/guides/table.md +82 -82
- package/dist/host/guides/template.md +41 -41
- package/dist/host/guides/terminal.md +121 -121
- package/dist/host/guides/test.md +273 -273
- package/dist/host/guides/timeout.md +18 -18
- package/dist/host/guides/tool.md +27 -27
- package/dist/host/guides/toolbox.md +166 -166
- package/dist/host/guides/websocket.md +54 -54
- package/dist/host/guides/worker.md +24 -24
- package/dist/host/guides/workflow.md +187 -187
- package/dist/host/guides/workspace.md +55 -55
- package/dist/host/manifest.json +93 -93
- package/dist/host/tests/setupPolicy.ts +5 -3
- package/dist/src/core/index.cjs +89 -3
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +229 -144
- package/dist/src/core/index.d.ts +229 -144
- package/dist/src/core/index.js +87 -4
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/server/index.cjs +292 -66
- package/dist/src/server/index.cjs.map +1 -1
- package/dist/src/server/index.d.cts +188 -6
- package/dist/src/server/index.d.ts +188 -6
- package/dist/src/server/index.js +287 -69
- package/dist/src/server/index.js.map +1 -1
- package/package.json +4 -3
|
@@ -144,9 +144,11 @@ export function createPolicySurfaceGuide(names: readonly string[]): string {
|
|
|
144
144
|
'',
|
|
145
145
|
'## Surface',
|
|
146
146
|
'',
|
|
147
|
-
'| Name | Kind | Summary |',
|
|
148
|
-
'| ---- | ---- | ------- |',
|
|
149
|
-
...names.map(
|
|
147
|
+
'| Name | Kind | Signature | Summary |',
|
|
148
|
+
'| ---- | ---- | --------- | ------- |',
|
|
149
|
+
...names.map(
|
|
150
|
+
(name) => `| \`${name}\` | function | \`() => void\` | Declares a fixture name. |`,
|
|
151
|
+
),
|
|
150
152
|
'',
|
|
151
153
|
].join('\n')
|
|
152
154
|
}
|
package/dist/src/core/index.cjs
CHANGED
|
@@ -4,14 +4,15 @@ let _orkestrel_template = require("@orkestrel/template");
|
|
|
4
4
|
let _orkestrel_emitter = require("@orkestrel/emitter");
|
|
5
5
|
var package_default = {
|
|
6
6
|
name: "@orkestrel/scaffold",
|
|
7
|
-
version: "0.0.
|
|
8
|
-
description: "Scaffold workspaces with commands: new, audit, repair, catalog, and overwrite.",
|
|
7
|
+
version: "0.0.116",
|
|
8
|
+
description: "Scaffold workspaces with commands: new, audit, surface, repair, catalog, and overwrite.",
|
|
9
9
|
keywords: [
|
|
10
10
|
"audit",
|
|
11
11
|
"catalog",
|
|
12
12
|
"new",
|
|
13
13
|
"overwrite",
|
|
14
|
-
"repair"
|
|
14
|
+
"repair",
|
|
15
|
+
"surface"
|
|
15
16
|
],
|
|
16
17
|
homepage: "https://github.com/orkestrel/scaffold#readme",
|
|
17
18
|
bugs: "https://github.com/orkestrel/scaffold/issues",
|
|
@@ -5509,6 +5510,88 @@ function parseCompilerOptions(value) {
|
|
|
5509
5510
|
}
|
|
5510
5511
|
// src/core/helpers.ts
|
|
5511
5512
|
/**
|
|
5513
|
+
* Collects bare names claimed by distinct owners in sorted order.
|
|
5514
|
+
*
|
|
5515
|
+
* @remarks
|
|
5516
|
+
* Declaration keywords and environments do not enter a claim's identity.
|
|
5517
|
+
* Repeated claims by one owner count once.
|
|
5518
|
+
*
|
|
5519
|
+
* @example
|
|
5520
|
+
* ```ts
|
|
5521
|
+
* import { collectSurfaceCollisions } from '@orkestrel/scaffold'
|
|
5522
|
+
*
|
|
5523
|
+
* collectSurfaceCollisions([{ owner: 'router', names: ['Route'] }]) // []
|
|
5524
|
+
* ```
|
|
5525
|
+
*/
|
|
5526
|
+
function collectSurfaceCollisions(claims) {
|
|
5527
|
+
return [...Map.groupBy(claims.flatMap(({ owner, names }) => names.map((name) => ({
|
|
5528
|
+
name,
|
|
5529
|
+
owner
|
|
5530
|
+
}))), ({ name }) => name)].sort(([left], [right]) => left < right ? -1 : left > right ? 1 : 0).flatMap(([name, entries]) => {
|
|
5531
|
+
const owners = [...new Set(entries.map(({ owner }) => owner))].sort();
|
|
5532
|
+
return owners.length > 1 ? [{
|
|
5533
|
+
name,
|
|
5534
|
+
owners
|
|
5535
|
+
}] : [];
|
|
5536
|
+
});
|
|
5537
|
+
}
|
|
5538
|
+
/**
|
|
5539
|
+
* Compares collisions with the record and reports errors, recorded subsets, and closures.
|
|
5540
|
+
*
|
|
5541
|
+
* @remarks
|
|
5542
|
+
* A name absent from the record or carrying an additional owner is an error.
|
|
5543
|
+
* A recorded name absent from the collisions is closed. Results sort by name.
|
|
5544
|
+
*
|
|
5545
|
+
* @example
|
|
5546
|
+
* ```ts
|
|
5547
|
+
* import { compareSurfaceCollisions } from '@orkestrel/scaffold'
|
|
5548
|
+
*
|
|
5549
|
+
* compareSurfaceCollisions([], [{ name: 'Route', owners: ['router', 'server'] }])
|
|
5550
|
+
* // [{ name: 'Route', owners: ['router', 'server'], standing: 'closed' }]
|
|
5551
|
+
* ```
|
|
5552
|
+
*/
|
|
5553
|
+
function compareSurfaceCollisions(collisions, record) {
|
|
5554
|
+
const baseline = new Map(record.map((entry) => [entry.name, entry.owners]));
|
|
5555
|
+
const names = new Set(collisions.map(({ name }) => name));
|
|
5556
|
+
return [...collisions.map(({ name, owners }) => ({
|
|
5557
|
+
name,
|
|
5558
|
+
owners: [...owners],
|
|
5559
|
+
standing: owners.every((owner) => baseline.get(name)?.includes(owner)) ? "recorded" : "error"
|
|
5560
|
+
})), ...record.filter(({ name }) => !names.has(name)).map(({ name, owners }) => ({
|
|
5561
|
+
name,
|
|
5562
|
+
owners: [...owners],
|
|
5563
|
+
standing: "closed"
|
|
5564
|
+
}))].sort((left, right) => left.name < right.name ? -1 : left.name > right.name ? 1 : 0);
|
|
5565
|
+
}
|
|
5566
|
+
/**
|
|
5567
|
+
* Collects the bare names one owner exports from two or more of its environments.
|
|
5568
|
+
*
|
|
5569
|
+
* @param owner - The unscoped package that exports the names.
|
|
5570
|
+
* @param exports - Each environment's exported bare names, keyed by environment.
|
|
5571
|
+
* @returns One conflict per such name with its sorted environments, sorted by name.
|
|
5572
|
+
*
|
|
5573
|
+
* @example
|
|
5574
|
+
* ```ts
|
|
5575
|
+
* import { collectSurfaceConflicts } from '@orkestrel/scaffold'
|
|
5576
|
+
*
|
|
5577
|
+
* collectSurfaceConflicts('mcp', { core: ['Tool'], server: ['Tool', 'Server'] })
|
|
5578
|
+
* // [{ name: 'Tool', owner: 'mcp', environments: ['core', 'server'] }]
|
|
5579
|
+
* ```
|
|
5580
|
+
*/
|
|
5581
|
+
function collectSurfaceConflicts(owner, exports) {
|
|
5582
|
+
return [...Map.groupBy(Object.entries(exports).flatMap(([environment, names]) => names.map((name) => ({
|
|
5583
|
+
name,
|
|
5584
|
+
environment
|
|
5585
|
+
}))), ({ name }) => name)].sort(([left], [right]) => left < right ? -1 : left > right ? 1 : 0).flatMap(([name, entries]) => {
|
|
5586
|
+
const environments = [...new Set(entries.map(({ environment }) => environment))].sort();
|
|
5587
|
+
return environments.length > 1 ? [{
|
|
5588
|
+
name,
|
|
5589
|
+
owner,
|
|
5590
|
+
environments
|
|
5591
|
+
}] : [];
|
|
5592
|
+
});
|
|
5593
|
+
}
|
|
5594
|
+
/**
|
|
5512
5595
|
* Encodes bytes as exact lowercase hexadecimal text.
|
|
5513
5596
|
*
|
|
5514
5597
|
* @param bytes - The bytes to encode.
|
|
@@ -9749,6 +9832,9 @@ exports.blueprintToWritableScripts = blueprintToWritableScripts;
|
|
|
9749
9832
|
exports.bytesToHex = bytesToHex;
|
|
9750
9833
|
exports.catalogToLayers = catalogToLayers;
|
|
9751
9834
|
exports.cloneValue = cloneValue;
|
|
9835
|
+
exports.collectSurfaceCollisions = collectSurfaceCollisions;
|
|
9836
|
+
exports.collectSurfaceConflicts = collectSurfaceConflicts;
|
|
9837
|
+
exports.compareSurfaceCollisions = compareSurfaceCollisions;
|
|
9752
9838
|
exports.compareVersions = compareVersions;
|
|
9753
9839
|
exports.computeBytes = computeBytes;
|
|
9754
9840
|
exports.computeHash = computeHash;
|