@synap-core/workspace-templates 0.49.0 → 0.51.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/capabilities/hetzner-cloud.capability.json +278 -0
- package/capabilities/vercel.capability.json +76 -2
- package/dist/index.js +53 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/builder.yaml +30 -2
- package/src/catalog-safety.test.ts +60 -0
- package/src/templates.ts +27 -1
package/package.json
CHANGED
package/src/builder.yaml
CHANGED
|
@@ -1885,8 +1885,10 @@ playbooks:
|
|
|
1885
1885
|
server-only credentials, no writes until the person can sign in, the
|
|
1886
1886
|
Website Factory gates re-run independently on the devbox; after slice 1
|
|
1887
1887
|
STOP for the person's first look. DOGFOOD: walk the app as the person
|
|
1888
|
-
would and collect their verdict.
|
|
1889
|
-
|
|
1888
|
+
would and collect their verdict. LAUNCH (last, behind the person's go): one
|
|
1889
|
+
door per case, see the stage. Until that go: branches and pull requests
|
|
1890
|
+
only, never push to main, never publish the catalog, never deploy
|
|
1891
|
+
production.
|
|
1890
1892
|
Separate VERIFIED (gate output quoted) from NEEDS-DOGFOOD in every
|
|
1891
1893
|
report.
|
|
1892
1894
|
subjectProfile:
|
|
@@ -1903,6 +1905,7 @@ playbooks:
|
|
|
1903
1905
|
options: [private, pod-app, showcase, static]
|
|
1904
1906
|
- { name: app, type: entity, label: The app, if it already exists }
|
|
1905
1907
|
executor: is-agent
|
|
1908
|
+
tools: [vercel_list_projects, vercel_list_env_vars, vercel_upsert_env, vercel_redeploy, vercel_get_deployment]
|
|
1906
1909
|
status: active
|
|
1907
1910
|
criteria:
|
|
1908
1911
|
- key: three-gates-only
|
|
@@ -2043,6 +2046,31 @@ playbooks:
|
|
|
2043
2046
|
- kind: document
|
|
2044
2047
|
label: Dogfood report and the person's verdict
|
|
2045
2048
|
relationToSubject: relates_to
|
|
2049
|
+
- key: launch
|
|
2050
|
+
name: Launch
|
|
2051
|
+
category: completed
|
|
2052
|
+
goal: >-
|
|
2053
|
+
Put the app on its host, one door per case. (a) A Website Factory
|
|
2054
|
+
site: load the launch-site skill, run `pnpm site:launch` as a dry run,
|
|
2055
|
+
then `--apply`, then the person's go, then `--deploy --check`. (b) A
|
|
2056
|
+
site on Vercel that is not from the Website Factory: the vercel
|
|
2057
|
+
verbs, vercel_list_projects, vercel_list_env_vars, vercel_upsert_env
|
|
2058
|
+
(Config values only: a URL or a public id, never a secret),
|
|
2059
|
+
vercel_redeploy (an env change reaches only a new deployment), then
|
|
2060
|
+
vercel_get_deployment until it is ready. (c) Any credential the pod
|
|
2061
|
+
mints for the host (an inbound webhook source's URL and secret): the
|
|
2062
|
+
inbound_source.connect verb; never ask the person to paste a secret
|
|
2063
|
+
and never hold one yourself. After a redeploy, check the deployment live
|
|
2064
|
+
(its state, and the page or form it serves) and quote the result.
|
|
2065
|
+
Record the deployment on the app.
|
|
2066
|
+
# The one irreversible commitment: the person's go before anything is deployed.
|
|
2067
|
+
# No stage criteria: the playbook sits at the pod's 12-criteria cap.
|
|
2068
|
+
gate: { kind: human }
|
|
2069
|
+
onFail: { toStage: slices }
|
|
2070
|
+
expectedOutputs:
|
|
2071
|
+
- kind: devplane_deployment
|
|
2072
|
+
label: Production deployment (and the host wiring that was approved)
|
|
2073
|
+
relationToSubject: relates_to
|
|
2046
2074
|
|
|
2047
2075
|
# THE DEV LOOP AS STORED CONFIG (plan v5 T2, 2026-10-27). One change = one
|
|
2048
2076
|
# session on its feature: shaped → building → PR opened → checks green →
|
|
@@ -196,3 +196,63 @@ describe("(c) catalog content ships in the npm bundle; the build reads only src/
|
|
|
196
196
|
for (const d of CONTENT_DIRS) expect(build, d).not.toMatch(new RegExp(`["'\`/]${d}/`));
|
|
197
197
|
});
|
|
198
198
|
});
|
|
199
|
+
|
|
200
|
+
// ── (d) a write verb never maps its secret input back ──────────────────────
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* A declarative write verb (any method but GET) that sends a value upstream must not
|
|
204
|
+
* map a response path ending in `value`, `secret`, `token`, `password`, `apiKey` or
|
|
205
|
+
* `credential` into its result: the provider may echo what was sent (Vercel's env
|
|
206
|
+
* create answers `created.value`), and the result is stored on proposals, runs and
|
|
207
|
+
* recall facts. READ verbs are out of scope on purpose (Slack's `topic.value` is a
|
|
208
|
+
* channel topic, not a credential). Honest limit: a path with another name is not
|
|
209
|
+
* caught; this is the shape of the known leak, not a proof.
|
|
210
|
+
*/
|
|
211
|
+
const SECRET_LEAF = /(^|\.)(value|secret|token|password|api_?key|credential)s?$/i;
|
|
212
|
+
|
|
213
|
+
type VerbLike = {
|
|
214
|
+
name: string;
|
|
215
|
+
providerSpec?: {
|
|
216
|
+
method?: string;
|
|
217
|
+
responseShape?: { item?: Record<string, unknown>; scalar?: Record<string, unknown> };
|
|
218
|
+
};
|
|
219
|
+
};
|
|
220
|
+
|
|
221
|
+
function secretEchoes(verbs: VerbLike[]): string[] {
|
|
222
|
+
return verbs.flatMap((v) => {
|
|
223
|
+
const spec = v.providerSpec;
|
|
224
|
+
if (!spec || (spec.method ?? "GET").toUpperCase() === "GET") return [];
|
|
225
|
+
const shape = spec.responseShape ?? {};
|
|
226
|
+
return Object.entries({ ...(shape.item ?? {}), ...(shape.scalar ?? {}) })
|
|
227
|
+
.filter(([, src]) => typeof src === "string" && SECRET_LEAF.test(src))
|
|
228
|
+
.map(([out, src]) => `${v.name}: ${out} <- ${src as string}`);
|
|
229
|
+
});
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
describe("(d) a write verb never maps its secret input back", () => {
|
|
233
|
+
const verbs = capFiles.flatMap(
|
|
234
|
+
(c) => (JSON.parse(c.text).spec?.skills ?? []) as VerbLike[]
|
|
235
|
+
);
|
|
236
|
+
|
|
237
|
+
it("non-vacuity: the scan sees the write verbs, among them vercel_upsert_env", () => {
|
|
238
|
+
const writes = verbs.filter((v) => v.providerSpec && (v.providerSpec.method ?? "GET").toUpperCase() !== "GET");
|
|
239
|
+
expect(writes.length).toBeGreaterThanOrEqual(10);
|
|
240
|
+
const upsert = verbs.find((v) => v.name === "vercel_upsert_env");
|
|
241
|
+
expect(upsert).toBeDefined();
|
|
242
|
+
expect(Object.keys(upsert?.providerSpec?.responseShape?.scalar ?? {}).length).toBeGreaterThan(0);
|
|
243
|
+
});
|
|
244
|
+
|
|
245
|
+
it("self-check: a write verb mapping `created.value` is reported, a read verb's `topic.value` is not", () => {
|
|
246
|
+
expect(
|
|
247
|
+
secretEchoes([
|
|
248
|
+
{ name: "w", providerSpec: { method: "POST", responseShape: { scalar: { v: "created.value" } } } },
|
|
249
|
+
{ name: "r", providerSpec: { method: "GET", responseShape: { scalar: { topic: "topic.value" } } } },
|
|
250
|
+
{ name: "ok", providerSpec: { method: "POST", responseShape: { scalar: { id: "created.id" } } } },
|
|
251
|
+
])
|
|
252
|
+
).toEqual(["w: v <- created.value"]);
|
|
253
|
+
});
|
|
254
|
+
|
|
255
|
+
it("no write verb in any capability maps a secret-shaped response path", () => {
|
|
256
|
+
expect(secretEchoes(verbs)).toEqual([]);
|
|
257
|
+
});
|
|
258
|
+
});
|
package/src/templates.ts
CHANGED
|
@@ -6465,7 +6465,7 @@ const DATA = {
|
|
|
6465
6465
|
{
|
|
6466
6466
|
"name": "Build an app (App Factory)",
|
|
6467
6467
|
"description": "Turn \"let's build app X\" into a researched, designed, reviewed and verified app, built from the Website Factory in slices. The person is asked only three times — the decisions, the design approval, and a first look after slice 1.",
|
|
6468
|
-
"goalTemplate": "Build the app \"{name}\": {idea}. Path: {path}. Work it as the App Factory: FIRST load pod skill reference/sdk-and-app-templates (the current SDK, the Website Factory pod-app template and what it can do), then each stage's skill with synap_load_skill. INTAKE: find or create the app (resolve first; one devplane_app, never a twin), make it this session's subject, and record the idea in the person's words. RESEARCH (app-factory-research): name-collision check, a data contract per screen with live examples and counts, an identity and permission table (who writes, who approves, can the app's credential do it, with evidence), every platform gap with an id and an owner, and the real sample world; write the plan document. DECISIONS: ask the person 2-4 multiple-choice questions in ONE ask, each with a recommended default; nothing is designed before they answer. DESIGN (app-factory-design-canvas): create the app repo from the Website Factory, draw every page and every state, desktop and phone, with its design-kit in the real components and the person's real data, and publish the canvas. REVIEW (app-factory-design-review): run the three read-only lenses in parallel — UX surface, component fidelity + contrast + responsive, data contract per element. CONSOLIDATE: one writer merges them into a redesign brief, applies it, and re-runs design:check and design:preview. DESIGN APPROVAL: the person approves the canvas; nothing is built from boards they have not approved. INFRA: open the platform, catalog and factory pull requests the slices need, each gap with its owner, or label a bridge in the UI and the code. BUILD (app-factory-build-slice): slice by slice, server-only credentials, no writes until the person can sign in, the Website Factory gates re-run independently on the devbox; after slice 1 STOP for the person's first look. DOGFOOD: walk the app as the person would and collect their verdict.
|
|
6468
|
+
"goalTemplate": "Build the app \"{name}\": {idea}. Path: {path}. Work it as the App Factory: FIRST load pod skill reference/sdk-and-app-templates (the current SDK, the Website Factory pod-app template and what it can do), then each stage's skill with synap_load_skill. INTAKE: find or create the app (resolve first; one devplane_app, never a twin), make it this session's subject, and record the idea in the person's words. RESEARCH (app-factory-research): name-collision check, a data contract per screen with live examples and counts, an identity and permission table (who writes, who approves, can the app's credential do it, with evidence), every platform gap with an id and an owner, and the real sample world; write the plan document. DECISIONS: ask the person 2-4 multiple-choice questions in ONE ask, each with a recommended default; nothing is designed before they answer. DESIGN (app-factory-design-canvas): create the app repo from the Website Factory, draw every page and every state, desktop and phone, with its design-kit in the real components and the person's real data, and publish the canvas. REVIEW (app-factory-design-review): run the three read-only lenses in parallel — UX surface, component fidelity + contrast + responsive, data contract per element. CONSOLIDATE: one writer merges them into a redesign brief, applies it, and re-runs design:check and design:preview. DESIGN APPROVAL: the person approves the canvas; nothing is built from boards they have not approved. INFRA: open the platform, catalog and factory pull requests the slices need, each gap with its owner, or label a bridge in the UI and the code. BUILD (app-factory-build-slice): slice by slice, server-only credentials, no writes until the person can sign in, the Website Factory gates re-run independently on the devbox; after slice 1 STOP for the person's first look. DOGFOOD: walk the app as the person would and collect their verdict. LAUNCH (last, behind the person's go): one door per case, see the stage. Until that go: branches and pull requests only, never push to main, never publish the catalog, never deploy production. Separate VERIFIED (gate output quoted) from NEEDS-DOGFOOD in every report.",
|
|
6469
6469
|
"subjectProfile": {
|
|
6470
6470
|
"profileSlug": "devplane_app"
|
|
6471
6471
|
},
|
|
@@ -6508,6 +6508,13 @@ const DATA = {
|
|
|
6508
6508
|
}
|
|
6509
6509
|
],
|
|
6510
6510
|
"executor": "is-agent",
|
|
6511
|
+
"tools": [
|
|
6512
|
+
"vercel_list_projects",
|
|
6513
|
+
"vercel_list_env_vars",
|
|
6514
|
+
"vercel_upsert_env",
|
|
6515
|
+
"vercel_redeploy",
|
|
6516
|
+
"vercel_get_deployment"
|
|
6517
|
+
],
|
|
6511
6518
|
"status": "active",
|
|
6512
6519
|
"criteria": [
|
|
6513
6520
|
{
|
|
@@ -6765,6 +6772,25 @@ const DATA = {
|
|
|
6765
6772
|
"relationToSubject": "relates_to"
|
|
6766
6773
|
}
|
|
6767
6774
|
]
|
|
6775
|
+
},
|
|
6776
|
+
{
|
|
6777
|
+
"key": "launch",
|
|
6778
|
+
"name": "Launch",
|
|
6779
|
+
"category": "completed",
|
|
6780
|
+
"goal": "Put the app on its host, one door per case. (a) A Website Factory site: load the launch-site skill, run `pnpm site:launch` as a dry run, then `--apply`, then the person's go, then `--deploy --check`. (b) A site on Vercel that is not from the Website Factory: the vercel verbs, vercel_list_projects, vercel_list_env_vars, vercel_upsert_env (Config values only: a URL or a public id, never a secret), vercel_redeploy (an env change reaches only a new deployment), then vercel_get_deployment until it is ready. (c) Any credential the pod mints for the host (an inbound webhook source's URL and secret): the inbound_source.connect verb; never ask the person to paste a secret and never hold one yourself. After a redeploy, check the deployment live (its state, and the page or form it serves) and quote the result. Record the deployment on the app.",
|
|
6781
|
+
"gate": {
|
|
6782
|
+
"kind": "human"
|
|
6783
|
+
},
|
|
6784
|
+
"onFail": {
|
|
6785
|
+
"toStage": "slices"
|
|
6786
|
+
},
|
|
6787
|
+
"expectedOutputs": [
|
|
6788
|
+
{
|
|
6789
|
+
"kind": "devplane_deployment",
|
|
6790
|
+
"label": "Production deployment (and the host wiring that was approved)",
|
|
6791
|
+
"relationToSubject": "relates_to"
|
|
6792
|
+
}
|
|
6793
|
+
]
|
|
6768
6794
|
}
|
|
6769
6795
|
]
|
|
6770
6796
|
},
|