@orkestrel/scaffold 0.0.117 → 0.0.118
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 +42 -15
- package/dist/bin/main.js.map +1 -1
- package/dist/host/agents/skills/orkestrel-publish/references/wave.md +1 -0
- package/dist/host/guides/scaffold.md +60 -22
- package/dist/host/manifest.json +3 -3
- package/dist/src/core/index.cjs +124 -1
- package/dist/src/core/index.cjs.map +1 -1
- package/dist/src/core/index.d.cts +123 -2
- package/dist/src/core/index.d.ts +123 -2
- package/dist/src/core/index.js +120 -2
- package/dist/src/core/index.js.map +1 -1
- package/dist/src/server/index.cjs +5 -3
- package/dist/src/server/index.cjs.map +1 -1
- package/dist/src/server/index.d.cts +6 -5
- package/dist/src/server/index.d.ts +6 -5
- package/dist/src/server/index.js +5 -3
- package/dist/src/server/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -14,8 +14,8 @@ import type { Plan } from '@orkestrel/scaffold';
|
|
|
14
14
|
import type { Release } from '@orkestrel/scaffold';
|
|
15
15
|
import type { Snapshot } from '@orkestrel/scaffold';
|
|
16
16
|
import type { SurfaceCandidate } from '@orkestrel/scaffold';
|
|
17
|
-
import type { SurfaceClaim } from '@orkestrel/scaffold';
|
|
18
17
|
import type { SurfaceCollision } from '@orkestrel/scaffold';
|
|
18
|
+
import type { SurfaceContract } from '@orkestrel/scaffold';
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Matches the Git branch syntax the repository endpoint accepts.
|
|
@@ -2067,7 +2067,7 @@ export declare class Materializer implements MaterializerInterface {
|
|
|
2067
2067
|
* readSurfaceClaims('./guides') // owners and the names their guides claim
|
|
2068
2068
|
* ```
|
|
2069
2069
|
*/
|
|
2070
|
-
export declare function readSurfaceClaims(root: string, loader?: SurfaceLoader): readonly
|
|
2070
|
+
export declare function readSurfaceClaims(root: string, loader?: SurfaceLoader): readonly SurfaceContract[];
|
|
2071
2071
|
|
|
2072
2072
|
/**
|
|
2073
2073
|
* Reads bare Surface names claimed by distinct package guides.
|
|
@@ -2111,7 +2111,7 @@ export declare class Materializer implements MaterializerInterface {
|
|
|
2111
2111
|
* readSurfaceFile('.', 'scaffold', 'candidate')?.names // the names the checkout's guide claims
|
|
2112
2112
|
* ```
|
|
2113
2113
|
*/
|
|
2114
|
-
export declare function readSurfaceFile(root: string | Host, owner: string, label: string, loader?: SurfaceLoader):
|
|
2114
|
+
export declare function readSurfaceFile(root: string | Host, owner: string, label: string, loader?: SurfaceLoader): SurfaceContract | undefined;
|
|
2115
2115
|
|
|
2116
2116
|
/**
|
|
2117
2117
|
* Reads one guide's claims and reports parser refusals with its owner and source.
|
|
@@ -2122,10 +2122,10 @@ export declare class Materializer implements MaterializerInterface {
|
|
|
2122
2122
|
* @example
|
|
2123
2123
|
* ```ts
|
|
2124
2124
|
* import { readSurfaceGuide } from '@orkestrel/scaffold/server'
|
|
2125
|
-
* readSurfaceGuide('# Sample', 'sample', 'live guides/sample.md') // { owner: 'sample', names: [] }
|
|
2125
|
+
* readSurfaceGuide('# Sample', 'sample', 'live guides/sample.md') // { owner: 'sample', names: [], signatures: new Map() }
|
|
2126
2126
|
* ```
|
|
2127
2127
|
*/
|
|
2128
|
-
export declare function readSurfaceGuide(text: string, owner: string, source: string, loader?: SurfaceLoader):
|
|
2128
|
+
export declare function readSurfaceGuide(text: string, owner: string, source: string, loader?: SurfaceLoader): SurfaceContract;
|
|
2129
2129
|
|
|
2130
2130
|
/**
|
|
2131
2131
|
* Loads and validates the guide functions required by surface reflection.
|
|
@@ -2428,6 +2428,7 @@ export declare class Materializer implements MaterializerInterface {
|
|
|
2428
2428
|
readonly createGuide: (text: string) => {
|
|
2429
2429
|
readonly surface: () => ReadonlyArray<{
|
|
2430
2430
|
readonly name: string;
|
|
2431
|
+
readonly signature?: string;
|
|
2431
2432
|
}>;
|
|
2432
2433
|
};
|
|
2433
2434
|
readonly createSource: (options: {
|
|
@@ -14,8 +14,8 @@ import type { Plan } from '@orkestrel/scaffold';
|
|
|
14
14
|
import type { Release } from '@orkestrel/scaffold';
|
|
15
15
|
import type { Snapshot } from '@orkestrel/scaffold';
|
|
16
16
|
import type { SurfaceCandidate } from '@orkestrel/scaffold';
|
|
17
|
-
import type { SurfaceClaim } from '@orkestrel/scaffold';
|
|
18
17
|
import type { SurfaceCollision } from '@orkestrel/scaffold';
|
|
18
|
+
import type { SurfaceContract } from '@orkestrel/scaffold';
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Matches the Git branch syntax the repository endpoint accepts.
|
|
@@ -2067,7 +2067,7 @@ export declare class Materializer implements MaterializerInterface {
|
|
|
2067
2067
|
* readSurfaceClaims('./guides') // owners and the names their guides claim
|
|
2068
2068
|
* ```
|
|
2069
2069
|
*/
|
|
2070
|
-
export declare function readSurfaceClaims(root: string, loader?: SurfaceLoader): readonly
|
|
2070
|
+
export declare function readSurfaceClaims(root: string, loader?: SurfaceLoader): readonly SurfaceContract[];
|
|
2071
2071
|
|
|
2072
2072
|
/**
|
|
2073
2073
|
* Reads bare Surface names claimed by distinct package guides.
|
|
@@ -2111,7 +2111,7 @@ export declare class Materializer implements MaterializerInterface {
|
|
|
2111
2111
|
* readSurfaceFile('.', 'scaffold', 'candidate')?.names // the names the checkout's guide claims
|
|
2112
2112
|
* ```
|
|
2113
2113
|
*/
|
|
2114
|
-
export declare function readSurfaceFile(root: string | Host, owner: string, label: string, loader?: SurfaceLoader):
|
|
2114
|
+
export declare function readSurfaceFile(root: string | Host, owner: string, label: string, loader?: SurfaceLoader): SurfaceContract | undefined;
|
|
2115
2115
|
|
|
2116
2116
|
/**
|
|
2117
2117
|
* Reads one guide's claims and reports parser refusals with its owner and source.
|
|
@@ -2122,10 +2122,10 @@ export declare class Materializer implements MaterializerInterface {
|
|
|
2122
2122
|
* @example
|
|
2123
2123
|
* ```ts
|
|
2124
2124
|
* import { readSurfaceGuide } from '@orkestrel/scaffold/server'
|
|
2125
|
-
* readSurfaceGuide('# Sample', 'sample', 'live guides/sample.md') // { owner: 'sample', names: [] }
|
|
2125
|
+
* readSurfaceGuide('# Sample', 'sample', 'live guides/sample.md') // { owner: 'sample', names: [], signatures: new Map() }
|
|
2126
2126
|
* ```
|
|
2127
2127
|
*/
|
|
2128
|
-
export declare function readSurfaceGuide(text: string, owner: string, source: string, loader?: SurfaceLoader):
|
|
2128
|
+
export declare function readSurfaceGuide(text: string, owner: string, source: string, loader?: SurfaceLoader): SurfaceContract;
|
|
2129
2129
|
|
|
2130
2130
|
/**
|
|
2131
2131
|
* Loads and validates the guide functions required by surface reflection.
|
|
@@ -2428,6 +2428,7 @@ export declare class Materializer implements MaterializerInterface {
|
|
|
2428
2428
|
readonly createGuide: (text: string) => {
|
|
2429
2429
|
readonly surface: () => ReadonlyArray<{
|
|
2430
2430
|
readonly name: string;
|
|
2431
|
+
readonly signature?: string;
|
|
2431
2432
|
}>;
|
|
2432
2433
|
};
|
|
2433
2434
|
readonly createSource: (options: {
|
package/dist/src/server/index.js
CHANGED
|
@@ -1769,15 +1769,16 @@ function readSurfaceModule(loader = createRequire(import.meta.url)) {
|
|
|
1769
1769
|
* @example
|
|
1770
1770
|
* ```ts
|
|
1771
1771
|
* import { readSurfaceGuide } from '@orkestrel/scaffold/server'
|
|
1772
|
-
* readSurfaceGuide('# Sample', 'sample', 'live guides/sample.md') // { owner: 'sample', names: [] }
|
|
1772
|
+
* readSurfaceGuide('# Sample', 'sample', 'live guides/sample.md') // { owner: 'sample', names: [], signatures: new Map() }
|
|
1773
1773
|
* ```
|
|
1774
1774
|
*/
|
|
1775
1775
|
function readSurfaceGuide(text, owner, source, loader) {
|
|
1776
1776
|
const guide = readSurfaceModule(loader);
|
|
1777
|
-
const parsed = attempt(() => guide.createGuide(text).surface()
|
|
1777
|
+
const parsed = attempt(() => guide.createGuide(text).surface());
|
|
1778
1778
|
if (parsed.success) return {
|
|
1779
1779
|
owner,
|
|
1780
|
-
names: parsed.value
|
|
1780
|
+
names: parsed.value.map(({ name }) => name),
|
|
1781
|
+
signatures: new Map(parsed.value.flatMap(({ name, signature }) => isString(signature) ? [[name, signature]] : []))
|
|
1781
1782
|
};
|
|
1782
1783
|
if (!guide.isGuideError(parsed.error)) throw parsed.error;
|
|
1783
1784
|
throw new ScaffoldError("TARGET", `Surface guide for ${JSON.stringify(owner.slice(0, 512))} from ${JSON.stringify(source.slice(0, 512))} was refused: ${parsed.error.message}`, {
|
|
@@ -1866,6 +1867,7 @@ function readSurfaceCandidate(root, loader) {
|
|
|
1866
1867
|
return {
|
|
1867
1868
|
owner,
|
|
1868
1869
|
names: [.../* @__PURE__ */ new Set([...guide?.names ?? [], ...Object.values(exports).flat()])].sort(),
|
|
1870
|
+
signatures: guide?.signatures ?? /* @__PURE__ */ new Map(),
|
|
1869
1871
|
conflicts: collectSurfaceConflicts(owner, exports)
|
|
1870
1872
|
};
|
|
1871
1873
|
}
|