@synap-core/workspace-templates 0.48.0 → 0.50.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": "@synap-core/workspace-templates",
3
- "version": "0.48.0",
3
+ "version": "0.50.0",
4
4
  "type": "module",
5
5
  "description": "Canonical workspace definitions — YAML source + typed exports for browser, backend, CLI, and marketplace",
6
6
  "repository": {
@@ -65,11 +65,13 @@ describe("Postiz contract — the keys the webhook and the capability share", ()
65
65
  const verb = capability.spec.skills.find((s) => s.name === "postiz_schedule_post");
66
66
  expect(verb?.intent).toBe("publish_post");
67
67
  expect(verb?.kind).toBe("code");
68
- // A write: an agent's run is a proposal (never metadata.readOnly). The pod's
69
- // post-gate runner writes `result.postId` onto the post named by the
70
- // `postEntityId` param (backend `metadata.writeBack` hook, lane pz-be).
68
+ // A write: an agent's run is a proposal (never metadata.readOnly), and a
69
+ // public post always asks (`proposeOnly`). The pod's post-gate runner
70
+ // writes `result.postId` onto the post named by the `postEntityId` param
71
+ // (backend `metadata.writeBack` hook, lane pz-be).
71
72
  expect(verb?.metadata).toEqual({
72
73
  verbType: "write",
74
+ proposeOnly: true,
73
75
  writeBack: { entityParam: "postEntityId", kind: "post", properties: { "postiz-post-id": "postId" } },
74
76
  });
75
77
  for (const p of ["content", "integrationId", "provider", "postEntityId"]) expect(Object.keys(verb?.parameters ?? {})).toContain(p);
@@ -133,3 +135,20 @@ describe("Postiz — what a pod app may ask it to publish", () => {
133
135
  expect(skill(name).inputMap, name).toBeUndefined();
134
136
  });
135
137
  });
138
+
139
+ // A public post always asks (231020d4): the four verbs that send one declare
140
+ // `metadata.proposeOnly`, so no auto grant and no auto rule runs them on any
141
+ // pod. The upload stores a file and publishes nothing: a person may widen it.
142
+ describe("Postiz — every public post is declared propose-only", () => {
143
+ const skill = (name: string) => capability.spec.skills.find((s) => s.name === name)!;
144
+
145
+ it.each(["postiz_draft", "postiz_schedule", "postiz_publish", "postiz_schedule_post"])("%s declares metadata.proposeOnly: true", (name) => {
146
+ expect(skill(name).metadata?.proposeOnly).toBe(true);
147
+ });
148
+
149
+ it("every verb serving publish_post declares it; the upload does not", () => {
150
+ for (const s of capability.spec.skills.filter((s) => s.intent === "publish_post"))
151
+ expect(s.metadata?.proposeOnly, s.name).toBe(true);
152
+ expect(skill("postiz_upload_from_url").metadata?.proposeOnly).toBeUndefined();
153
+ });
154
+ });