@orkestrel/scaffold 0.0.87 → 0.0.88
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/agents/skills/orkestrel-harden/scripts/discovery.js +9 -4
- package/dist/bin/main.js +2 -2
- package/dist/bin/main.js.map +1 -1
- package/dist/host/agents/skills/orkestrel-harden/scripts/discovery.ts +12 -3
- package/dist/host/claude/agents/orkestrel.md +2 -2
- package/dist/host/claude/rules/architecture.md +4 -0
- package/dist/host/configs/policy.ts +13 -3
- package/dist/host/guides/browser.md +2626 -1195
- package/dist/host/guides/contract.md +1 -1
- package/dist/host/manifest.json +8 -8
- package/dist/host/scripts/codex.sh +0 -0
- package/dist/host/scripts/cursor.sh +0 -0
- package/dist/host/scripts/deps.sh +0 -0
- package/dist/host/scripts/ollama.sh +0 -0
- package/dist/host/tests/config.test.ts +34 -0
- package/dist/src/core/index.cjs +9 -2
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +7 -7
- package/dist/src/core/index.d.ts +7 -7
- package/dist/src/core/index.js +9 -2
- package/dist/src/core/index.js.map +1 -1
- package/package.json +2 -2
|
@@ -97,9 +97,18 @@ function listCollected(config: string): readonly Collected[] | undefined {
|
|
|
97
97
|
maxBuffer: 64 * 1024 * 1024,
|
|
98
98
|
windowsHide: true,
|
|
99
99
|
})
|
|
100
|
-
if (result.status !== 0) return undefined
|
|
101
100
|
const start = result.stdout.indexOf('[')
|
|
102
|
-
if (start === -1)
|
|
101
|
+
if (result.status !== 0 || start === -1) {
|
|
102
|
+
const diagnostic = result.stderr || result.error?.message || result.stdout
|
|
103
|
+
console.error(
|
|
104
|
+
diagnostic
|
|
105
|
+
.split(/\r\n|\n/u)
|
|
106
|
+
.filter((line) => line.trim() !== '')
|
|
107
|
+
.slice(0, 12)
|
|
108
|
+
.join('\n'),
|
|
109
|
+
)
|
|
110
|
+
return undefined
|
|
111
|
+
}
|
|
103
112
|
const parsed: unknown = JSON.parse(result.stdout.slice(start))
|
|
104
113
|
if (!Array.isArray(parsed)) return undefined
|
|
105
114
|
const collected: Collected[] = []
|
|
@@ -151,7 +160,7 @@ function main(argv: readonly string[]): number {
|
|
|
151
160
|
const gates = readGates(readScripts())
|
|
152
161
|
const collected = listCollected(config)
|
|
153
162
|
if (collected === undefined) {
|
|
154
|
-
console.error('discovery: vitest list failed
|
|
163
|
+
console.error('discovery: vitest list failed')
|
|
155
164
|
return 2
|
|
156
165
|
}
|
|
157
166
|
const named = (readOption(argv, '--projects') ?? '').split(',').filter((name) => name !== '')
|
|
@@ -48,7 +48,7 @@ so network-controlled descriptions never enter agent instruction context.
|
|
|
48
48
|
| `@orkestrel/abort` | `0.0.12` | L1 | `@orkestrel/contract` `^0.0.18` | |
|
|
49
49
|
| `@orkestrel/agent` | `0.0.25` | L5 | `@orkestrel/tool` `^0.0.17`, `@orkestrel/abort` `^0.0.12`, `@orkestrel/queue` `^0.0.15`, `@orkestrel/budget` `^0.0.12`, `@orkestrel/emitter` `^0.0.11`, `@orkestrel/timeout` `^0.0.12`, `@orkestrel/contract` `^0.0.18`, `@orkestrel/database` `^0.0.16`, `@orkestrel/workflow` `^0.0.20`, `@orkestrel/workspace` `^0.0.10` | |
|
|
50
50
|
| `@orkestrel/brief` | `0.0.10` | L4 | `@orkestrel/reason` `^0.0.12`, `@orkestrel/emitter` `^0.0.11`, `@orkestrel/contract` `^0.0.18`, `@orkestrel/interpret` `^0.0.15` | |
|
|
51
|
-
| `@orkestrel/browser` | `0.0.
|
|
51
|
+
| `@orkestrel/browser` | `0.0.21` | L5 | `@orkestrel/mcp` `^0.0.35`, `@orkestrel/html` `^0.0.12`, `@orkestrel/tool` `^0.0.18`, `@orkestrel/router` `^0.0.16`, `@orkestrel/server` `^0.0.22`, `@orkestrel/emitter` `^0.0.11`, `@orkestrel/contract` `^0.0.19`, `@orkestrel/markdown` `^0.0.17`, `@orkestrel/websocket` `^0.0.14` | |
|
|
52
52
|
| `@orkestrel/budget` | `0.0.12` | L1 | `@orkestrel/contract` `^0.0.18` | |
|
|
53
53
|
| `@orkestrel/codec` | `0.0.5` | L1 | `@orkestrel/contract` `^0.0.18` | |
|
|
54
54
|
| `@orkestrel/console` | `0.0.15` | L2 | `@orkestrel/emitter` `^0.0.11`, `@orkestrel/contract` `^0.0.18` | |
|
|
@@ -78,7 +78,7 @@ so network-controlled descriptions never enter agent instruction context.
|
|
|
78
78
|
| `@orkestrel/reason` | `0.0.12` | L2 | `@orkestrel/emitter` `^0.0.11`, `@orkestrel/contract` `^0.0.18` | |
|
|
79
79
|
| `@orkestrel/relation` | `0.0.14` | L3 | `@orkestrel/emitter` `^0.0.11`, `@orkestrel/contract` `^0.0.18`, `@orkestrel/database` `^0.0.16` | |
|
|
80
80
|
| `@orkestrel/router` | `0.0.16` | L2 | `@orkestrel/abort` `^0.0.12`, `@orkestrel/emitter` `^0.0.11`, `@orkestrel/contract` `^0.0.18` | |
|
|
81
|
-
| `@orkestrel/scaffold` | `0.0.
|
|
81
|
+
| `@orkestrel/scaffold` | `0.0.87` | L3 | `@orkestrel/console` `^0.0.15`, `@orkestrel/emitter` `^0.0.11`, `@orkestrel/process` `^0.0.14`, `@orkestrel/contract` `^0.0.19`, `@orkestrel/markdown` `^0.0.17`, `@orkestrel/template` `^0.0.9` | |
|
|
82
82
|
| `@orkestrel/sea` | `0.0.18` | L3 | `@orkestrel/emitter` `^0.0.11`, `@orkestrel/process` `^0.0.14`, `@orkestrel/contract` `^0.0.18` | |
|
|
83
83
|
| `@orkestrel/server` | `0.0.22` | L3 | `@orkestrel/abort` `^0.0.12`, `@orkestrel/codec` `^0.0.5`, `@orkestrel/router` `^0.0.16`, `@orkestrel/emitter` `^0.0.11`, `@orkestrel/timeout` `^0.0.12`, `@orkestrel/contract` `^0.0.19` | |
|
|
84
84
|
| `@orkestrel/sqlite` | `0.0.13` | L1 | `@orkestrel/contract` `^0.0.18` | |
|
|
@@ -133,6 +133,10 @@ neither reads meaning.
|
|
|
133
133
|
`helpers.ts`, `inferers.ts`, `middlewares.ts`, `parsers.ts`, `plugins.ts`, `relations.ts`,
|
|
134
134
|
`schemas.ts`, `seeders.ts`, `shapers.ts`, and `validators.ts`. That list is exhaustive, a new function kind joins it, and no
|
|
135
135
|
later version of the plugin claims more.
|
|
136
|
+
- The name forms read names only: a function, an export specifier, an exported import alias, and a
|
|
137
|
+
star re-export in the kind file. They never read a return type, so a `create{Name}Plugins` that
|
|
138
|
+
returns one plugin passes; review owns arity. A value binding in a kind file is the data rule's
|
|
139
|
+
finding, not the name form's.
|
|
136
140
|
- The plugin reports no `data` violation in `helpers.ts`. The kind rules place a camelCase
|
|
137
141
|
namespace of functions there, and a namespace of callables is not separable from a data table by
|
|
138
142
|
declaration syntax, so `DATA_EXEMPT_FILES` in `configs/policy.ts` excludes the file. Ordinary
|
|
@@ -287,7 +287,10 @@ export const POLICY_URL_PATTERN = /https?:\/\/\S+/gu
|
|
|
287
287
|
export const POLICY_NAME_FORMS: Readonly<Record<string, PolicyNameForm>> = Object.freeze({
|
|
288
288
|
'parsers.ts': Object.freeze({ pattern: /^parse/u, messageId: 'parser' }),
|
|
289
289
|
'factories.ts': Object.freeze({ pattern: /^create/u, messageId: 'factory' }),
|
|
290
|
-
'plugins.ts': Object.freeze({
|
|
290
|
+
'plugins.ts': Object.freeze({
|
|
291
|
+
pattern: /^create[A-Z][A-Za-z0-9]*Plugins?$/u,
|
|
292
|
+
messageId: 'plugin',
|
|
293
|
+
}),
|
|
291
294
|
})
|
|
292
295
|
|
|
293
296
|
/**
|
|
@@ -1010,8 +1013,8 @@ export function reportConstant(context: PolicyContext, node: PolicyExpression):
|
|
|
1010
1013
|
|
|
1011
1014
|
/**
|
|
1012
1015
|
* Reports a function in the named kind file whose name breaks that file's form, an export specifier
|
|
1013
|
-
* there that publishes a name outside it, and a star re-export there, whose
|
|
1014
|
-
* read.
|
|
1016
|
+
* or exported import alias there that publishes a name outside it, and a star re-export there, whose
|
|
1017
|
+
* names the form cannot read.
|
|
1015
1018
|
*/
|
|
1016
1019
|
export function reportName(context: PolicyContext, node: PolicyExpression, file: string): void {
|
|
1017
1020
|
const form = POLICY_NAME_FORMS[file]
|
|
@@ -1021,6 +1024,13 @@ export function reportName(context: PolicyContext, node: PolicyExpression, file:
|
|
|
1021
1024
|
return
|
|
1022
1025
|
}
|
|
1023
1026
|
if (node.type === 'ExportNamedDeclaration') {
|
|
1027
|
+
const alias = node.declaration
|
|
1028
|
+
if (alias?.type === 'TSImportEqualsDeclaration') {
|
|
1029
|
+
const name = identifierToPolicyName(alias.id)
|
|
1030
|
+
if (name === undefined || !form.pattern.test(name)) {
|
|
1031
|
+
context.report({ node: alias, messageId: form.messageId })
|
|
1032
|
+
}
|
|
1033
|
+
}
|
|
1024
1034
|
for (const specifier of node.specifiers ?? []) {
|
|
1025
1035
|
const exported = specifier.exported
|
|
1026
1036
|
const name =
|