@defrex/autobuild-hosted-dispatcher 1.0.0 → 1.1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@defrex/autobuild-hosted-dispatcher",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "engines": {
@@ -23,17 +23,9 @@
23
23
  * only — the operator function never reads them, so it never carries the
24
24
  * multi-megabyte tarball.
25
25
  *
26
- * It also appends `skills/operate/SKILL.md` — the canonical `ab-operate`
27
- * skill the embedded orchestrator reads at runtime through
28
- * `distributionPath` (AUT-342) — to BOTH function bundles that execute
29
- * turns: the operator route's trace (message and answer invocations run
30
- * there) and the dispatch route's trace (the tick's resume and wake passes
31
- * run the turn loop inside `/api/dispatch`, which otherwise traces only
32
- * `.autobuild-dist/**`). A dynamic fs read is invisible to tracing, so
33
- * without these appends the system prompt could not load in production while
34
- * every in-process test passed. Both entries are computed the same relative
35
- * way, and the step fails loudly when a trace file or the skill file is
36
- * missing — a deployment can never silently ship without the skill.
26
+ * The legacy operate-skill trace entries remain for packaging compatibility.
27
+ * Neither route executes operator turns; external harnesses load their own
28
+ * instructions. Removing these redundant entries is independent cleanup.
37
29
  */
38
30
  import { createHash } from 'node:crypto'
39
31
  import { readdir, readFile, stat, writeFile } from 'node:fs/promises'
@@ -45,8 +37,7 @@ export interface EnsureOptions {
45
37
  distDir?: string
46
38
  /** Distribution manifest to carry; defaults to the file provisioning reads. */
47
39
  manifest?: string
48
- /** Canonical operate skill to carry; defaults to the distribution tree the
49
- * turn runner reads at runtime. */
40
+ /** Legacy canonical operate skill entry carried for packaging compatibility. */
50
41
  skill?: string
51
42
  log?: (message: string) => void
52
43
  }
@@ -59,7 +50,7 @@ export interface EnsureResult {
59
50
  appended: boolean
60
51
  /** Whether the manifest entry was appended to the dispatch route's trace. */
61
52
  manifestAppended: boolean
62
- /** The canonical operate skill file carried into the turn-executing bundles. */
53
+ /** The canonical operate skill file carried into the legacy function bundles. */
63
54
  skill: string
64
55
  /** Route names whose trace got the skill appended ('dispatch', 'operator'). */
65
56
  skillAppended: string[]
@@ -68,8 +59,7 @@ export interface EnsureResult {
68
59
  const DIST_DIRECTORY = '.autobuild-dist'
69
60
  const TRACE_FILE = 'route.js.nft.json'
70
61
  const ROUTE_DIRECTORY = join('server', 'app', 'api', 'dispatch')
71
- /** The operator route — message and approval-answer invocations run turns
72
- * inside this function bundle. */
62
+ /** The operator HTTP route; retained legacy skill trace entry. */
73
63
  const OPERATOR_ROUTE_DIRECTORY = join('server', 'app', 'operator', '[[...path]]')
74
64
 
75
65
  async function findArchive(root: string): Promise<string> {
@@ -121,7 +111,7 @@ async function readTrace(path: string): Promise<string[]> {
121
111
  }
122
112
 
123
113
  /** Append the packed distribution archive, the distribution manifest, and the
124
- * canonical operate skill to the turn-executing routes' trace files — the
114
+ * legacy canonical operate skill to the routes' trace files — the
125
115
  * archive and manifest to the dispatch route's trace only, the skill to both. */
126
116
  export async function ensureDistributionArchiveInTrace({
127
117
  root = process.cwd(),
@@ -142,15 +132,14 @@ export async function ensureDistributionArchiveInTrace({
142
132
  await stat(skill)
143
133
  } catch {
144
134
  throw new Error(
145
- `missing canonical operate skill ${skill} — the orchestrator's system prompt ` +
146
- 'cannot load in production without it',
135
+ `missing canonical operate skill ${skill} — required by the legacy trace contract`,
147
136
  )
148
137
  }
149
138
  // Each route declares the trace entries it requires, matching the intent
150
139
  // recorded in packages/hosted-store-service/next.config.ts: the archive and
151
140
  // the manifest belong to the dispatch route alone (the operator function
152
- // never reads them), while both turn-executing routes carry the operate
153
- // skill (AUT-342).
141
+ // never reads them), while both routes retain the legacy operate
142
+ // skill trace entry.
154
143
  const routes: {
155
144
  name: string
156
145
  directory: string