@nebutra/idea-plaza 0.1.1 → 0.1.2

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.
@@ -1,5 +1,5 @@
1
- {"at":"2026-05-18T16:46:06.694Z","type":"reindex","tenantId":"tenant_a","files":0}
2
- {"at":"2026-05-18T16:46:06.775Z","type":"reindex","tenantId":"tenant_a","files":0}
3
- {"at":"2026-05-18T16:46:06.799Z","type":"write","tenantId":"tenant_a","path":"plaza/ideas/idea_loop_ai_debugging_mpbfrcmx.json"}
4
- {"at":"2026-05-18T16:46:06.904Z","type":"write","tenantId":"tenant_a","path":"plaza/forks/idea_fork_idea_loop_ai_debugging_mpbfrcmx_bob_mpbfrcpw.json"}
5
- {"at":"2026-05-18T16:46:06.962Z","type":"reindex","tenantId":"tenant_a","files":0}
1
+ {"at":"2026-05-19T08:15:21.139Z","type":"reindex","tenantId":"tenant_a","files":0}
2
+ {"at":"2026-05-19T08:15:21.233Z","type":"reindex","tenantId":"tenant_a","files":0}
3
+ {"at":"2026-05-19T08:15:21.253Z","type":"write","tenantId":"tenant_a","path":"plaza/ideas/idea_loop_ai_debugging_mpccyd1x.json"}
4
+ {"at":"2026-05-19T08:15:21.278Z","type":"write","tenantId":"tenant_a","path":"plaza/forks/idea_fork_idea_loop_ai_debugging_mpccyd1x_bob_mpccyd30.json"}
5
+ {"at":"2026-05-19T08:15:21.365Z","type":"reindex","tenantId":"tenant_a","files":0}
@@ -1,2 +1,2 @@
1
- {"traceId":"idea_plaza_publish_idea_loop_ai_debugging_mpbfrcmx_mpbfrcnj","kind":"content_write","affected":["plaza/ideas/idea_loop_ai_debugging_mpbfrcmx.json"],"parent":null,"snapshot":{"plaza/ideas/idea_loop_ai_debugging_mpbfrcmx.json":"{\n \"ideaId\": \"idea_loop_ai_debugging_mpbfrcmx\",\n \"title\": \"Loop\",\n \"oneLine\": \"AI debugging\",\n \"level\": \"cloneable\",\n \"tags\": [\n \"debugging\",\n \"developer-tools\"\n ],\n \"redactions\": [\n \"customers\",\n \"finances\"\n ],\n \"cemeteryWarnings\": [\n {\n \"title\": \"DebugMate\",\n \"cause\": \"no PMF\"\n }\n ],\n \"publicationPath\": \"plaza/ideas/idea_loop_ai_debugging_mpbfrcmx.json\",\n \"publishedAt\": \"2026-05-18T16:46:06.777Z\",\n \"body\": \"Developer tool for stack trace conversations.\"\n}\n"},"id":"4db4819ea5c49f99f878381edba1fc7b05954e77fa393d189308491b7dd1b48f","tenantId":"tenant_a","at":"2026-05-18T16:46:06.870Z","summary":"content_write touched 1 path(s)","objectHashes":["5eb4fb863f299007f89c7b9c60f0637630a3d96c86001295bbf3325603d63e20"]}
2
- {"traceId":"idea_plaza_fork_idea_fork_idea_loop_ai_debugging_mpbfrcm_mpbfrcqg","kind":"content_write","affected":["plaza/forks/idea_fork_idea_loop_ai_debugging_mpbfrcmx_bob_mpbfrcpw.json"],"parent":null,"snapshot":{"plaza/forks/idea_fork_idea_loop_ai_debugging_mpbfrcmx_bob_mpbfrcpw.json":"{\n \"forkId\": \"idea_fork_idea_loop_ai_debugging_mpbfrcmx_bob_mpbfrcpw\",\n \"sourceIdeaId\": \"idea_loop_ai_debugging_mpbfrcmx\",\n \"newFounderId\": \"bob\",\n \"inheritPlayPreferences\": true,\n \"attribution\": {\n \"displayInNewCompany\": true,\n \"publicLineage\": true\n },\n \"createdAt\": \"2026-05-18T16:46:06.884Z\"\n}\n"},"id":"b12d3c87177c0faaa310e0d0fd77e066112164b42cec2809f6c8c916bcd995b3","tenantId":"tenant_a","at":"2026-05-18T16:46:06.905Z","summary":"content_write touched 1 path(s)","objectHashes":["bdd18885c13c256316985bfcc7511d1a381f4065e52945180cb27eb9d74ba86b"]}
1
+ {"at":"2026-05-19T08:15:21.268Z","traceId":"idea_plaza_publish_idea_loop_ai_debugging_mpccyd1x_mpccyd2j","kind":"content_write","affected":["plaza/ideas/idea_loop_ai_debugging_mpccyd1x.json"],"parent":null,"snapshot":{"plaza/ideas/idea_loop_ai_debugging_mpccyd1x.json":"{\n \"ideaId\": \"idea_loop_ai_debugging_mpccyd1x\",\n \"title\": \"Loop\",\n \"oneLine\": \"AI debugging\",\n \"level\": \"cloneable\",\n \"tags\": [\n \"debugging\",\n \"developer-tools\"\n ],\n \"redactions\": [\n \"customers\",\n \"finances\"\n ],\n \"cemeteryWarnings\": [\n {\n \"title\": \"DebugMate\",\n \"cause\": \"no PMF\"\n }\n ],\n \"publicationPath\": \"plaza/ideas/idea_loop_ai_debugging_mpccyd1x.json\",\n \"publishedAt\": \"2026-05-19T08:15:21.237Z\",\n \"body\": \"Developer tool for stack trace conversations.\"\n}\n"},"id":"45b5368081456299156d9cac5d0988974197972a9b876f11d77e25d647ab06f2","tenantId":"tenant_a","summary":"content_write touched 1 path(s)","objectHashes":["be9b9188a92c773bee70c7a55e25465328039cf95091b7850ef68d248c02937a"]}
2
+ {"at":"2026-05-19T08:15:21.285Z","traceId":"idea_plaza_fork_idea_fork_idea_loop_ai_debugging_mpccyd1_mpccyd32","kind":"content_write","affected":["plaza/forks/idea_fork_idea_loop_ai_debugging_mpccyd1x_bob_mpccyd30.json"],"parent":null,"snapshot":{"plaza/forks/idea_fork_idea_loop_ai_debugging_mpccyd1x_bob_mpccyd30.json":"{\n \"forkId\": \"idea_fork_idea_loop_ai_debugging_mpccyd1x_bob_mpccyd30\",\n \"sourceIdeaId\": \"idea_loop_ai_debugging_mpccyd1x\",\n \"newFounderId\": \"bob\",\n \"inheritPlayPreferences\": true,\n \"attribution\": {\n \"displayInNewCompany\": true,\n \"publicLineage\": true\n },\n \"createdAt\": \"2026-05-19T08:15:21.276Z\"\n}\n"},"id":"3880a36b4b41d17b6953185f8ec7c7ed01556549727241a7818868f3a84edc75","tenantId":"tenant_a","summary":"content_write touched 1 path(s)","objectHashes":["2d915a42b41a19607ccac68cfaf9cf4b6854261754020e1662b13d0f3d088066"]}
@@ -1,3 +1,3 @@
1
- {"at":"2026-05-18T16:46:06.880Z","type":"publish","tenantId":"tenant_a","ideaId":"idea_loop_ai_debugging_mpbfrcmx","level":"cloneable"}
2
- {"at":"2026-05-18T16:46:06.905Z","type":"fork","tenantId":"tenant_a","ideaId":"idea_loop_ai_debugging_mpbfrcmx","forkId":"idea_fork_idea_loop_ai_debugging_mpbfrcmx_bob_mpbfrcpw"}
3
- {"at":"2026-05-18T16:46:06.906Z","type":"feed","tenantId":"tenant_a","sort":"hot"}
1
+ {"at":"2026-05-19T08:15:21.270Z","type":"publish","tenantId":"tenant_a","ideaId":"idea_loop_ai_debugging_mpccyd1x","level":"cloneable"}
2
+ {"at":"2026-05-19T08:15:21.286Z","type":"fork","tenantId":"tenant_a","ideaId":"idea_loop_ai_debugging_mpccyd1x","forkId":"idea_fork_idea_loop_ai_debugging_mpccyd1x_bob_mpccyd30"}
3
+ {"at":"2026-05-19T08:15:21.291Z","type":"feed","tenantId":"tenant_a","sort":"hot"}
@@ -1,5 +1,5 @@
1
1
 
2
- > @nebutra/idea-plaza@0.1.1 build /home/runner/work/Nebutra-Sailor/Nebutra-Sailor/packages/ai/idea-plaza
2
+ > @nebutra/idea-plaza@0.1.2 build /home/runner/work/Nebutra-Sailor/Nebutra-Sailor/packages/ai/idea-plaza
3
3
  > tsup
4
4
 
5
5
  CLI Building entry: src/cli.ts, src/index.ts
@@ -11,12 +11,12 @@
11
11
  ESM Build start
12
12
  ESM dist/cli.js 1.20 KB
13
13
  ESM dist/index.js 204.00 B
14
- ESM dist/chunk-2WSISCFT.js 5.57 KB
14
+ ESM dist/chunk-ODTUJYW5.js 5.61 KB
15
15
  ESM dist/cli.js.map 2.20 KB
16
16
  ESM dist/index.js.map 71.00 B
17
- ESM dist/chunk-2WSISCFT.js.map 12.08 KB
18
- ESM ⚡️ Build success in 43ms
17
+ ESM dist/chunk-ODTUJYW5.js.map 12.09 KB
18
+ ESM ⚡️ Build success in 81ms
19
19
  DTS Build start
20
- DTS ⚡️ Build success in 10629ms
20
+ DTS ⚡️ Build success in 11957ms
21
21
  DTS dist/cli.d.ts 13.00 B
22
22
  DTS dist/index.d.ts 2.76 KB
@@ -1,16 +1,14 @@
1
1
 
2
- > @nebutra/idea-plaza@0.1.1 test /home/runner/work/Nebutra-Sailor/Nebutra-Sailor/packages/ai/idea-plaza
2
+ > @nebutra/idea-plaza@0.1.2 test /home/runner/work/Nebutra-Sailor/Nebutra-Sailor/packages/ai/idea-plaza
3
3
  > vitest run
4
4
 
5
5
 
6
6
   RUN  v4.1.4 /home/runner/work/Nebutra-Sailor/Nebutra-Sailor/packages/ai/idea-plaza
7
7
 
8
- (node:11343) ExperimentalWarning: SQLite is an experimental feature and might change at any time
9
- (Use `node --trace-warnings ...` to show where the warning was created)
10
- ✓ src/index.test.ts (3 tests) 441ms
8
+ ✓ src/index.test.ts (3 tests) 501ms
11
9
 
12
10
   Test Files  1 passed (1)
13
11
   Tests  3 passed (3)
14
-  Start at  16:46:04
15
-  Duration  2.14s (transform 751ms, setup 0ms, import 878ms, tests 441ms, environment 0ms)
12
+  Start at  08:15:19
13
+  Duration  2.36s (transform 879ms, setup 0ms, import 1.05s, tests 501ms, environment 0ms)
16
14
 
@@ -1,4 +1,4 @@
1
1
 
2
- > @nebutra/idea-plaza@0.1.1 typecheck /home/runner/work/Nebutra-Sailor/Nebutra-Sailor/packages/ai/idea-plaza
2
+ > @nebutra/idea-plaza@0.1.2 typecheck /home/runner/work/Nebutra-Sailor/Nebutra-Sailor/packages/ai/idea-plaza
3
3
  > tsc --noEmit
4
4
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @nebutra/idea-plaza
2
2
 
3
+ ## 0.1.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Publish registry package metadata under the MIT license.
8
+
9
+ - Updated dependencies []:
10
+ - @nebutra/capability-kit@0.2.1
11
+ - @nebutra/content-store@0.1.1
12
+ - @nebutra/ecosystem-safety@0.1.1
13
+ - @nebutra/errors@0.1.1
14
+ - @nebutra/event-log@0.1.1
15
+ - @nebutra/generation-context@0.1.1
16
+
3
17
  ## 0.1.1
4
18
 
5
19
  ### Patch Changes
@@ -1,6 +1,7 @@
1
1
  // src/index.ts
2
2
  import { mkdir } from "fs/promises";
3
3
  import { join } from "path";
4
+ import { requireCapabilityTenant } from "@nebutra/capability-kit";
4
5
  import { appendCapabilityDebug, readCapabilityDebug } from "@nebutra/capability-kit/debug";
5
6
  import { ContentStore } from "@nebutra/content-store";
6
7
  import { assertPublicDisclosureSafe } from "@nebutra/ecosystem-safety";
@@ -8,15 +9,6 @@ import { CapabilityError } from "@nebutra/errors";
8
9
  import { EventLog } from "@nebutra/event-log";
9
10
  import { assetId } from "@nebutra/generation-context";
10
11
  import { scanForSensitiveFields } from "@nebutra/ecosystem-safety";
11
- function requireTenant(value) {
12
- if (!value?.trim()) {
13
- throw new CapabilityError("idea-plaza", "Idea Plaza requires tenant context", {
14
- suggestion: "Pass tenantId so publish snapshots stay tenant-scoped.",
15
- statusCode: 400
16
- });
17
- }
18
- return value;
19
- }
20
12
  function bodyForScan(request) {
21
13
  return [request.title, request.oneLine, request.body ?? "", request.tags.join(" ")].join("\n");
22
14
  }
@@ -28,7 +20,13 @@ var IdeaPlaza = class _IdeaPlaza {
28
20
  #ideas = /* @__PURE__ */ new Map();
29
21
  #forks = /* @__PURE__ */ new Map();
30
22
  constructor(options) {
31
- this.#tenantId = requireTenant(options.tenantId);
23
+ this.#tenantId = requireCapabilityTenant({
24
+ explicit: options.tenantId,
25
+ onMissing: () => new CapabilityError("idea-plaza", "Idea Plaza requires tenant context", {
26
+ suggestion: "Pass tenantId so publish snapshots stay tenant-scoped.",
27
+ statusCode: 400
28
+ })
29
+ });
32
30
  this.#debugRoot = options.debugRoot ?? process.cwd();
33
31
  this.#contentStore = options.contentStore;
34
32
  this.#eventLog = options.eventLog;
@@ -144,4 +142,4 @@ export {
144
142
  readIdeaPlazaDebug,
145
143
  scanForSensitiveFields
146
144
  };
147
- //# sourceMappingURL=chunk-2WSISCFT.js.map
145
+ //# sourceMappingURL=chunk-ODTUJYW5.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { mkdir } from \"node:fs/promises\";\nimport { join } from \"node:path\";\nimport { requireCapabilityTenant } from \"@nebutra/capability-kit\";\nimport { appendCapabilityDebug, readCapabilityDebug } from \"@nebutra/capability-kit/debug\";\nimport { ContentStore } from \"@nebutra/content-store\";\nimport { assertPublicDisclosureSafe } from \"@nebutra/ecosystem-safety\";\nimport { CapabilityError } from \"@nebutra/errors\";\nimport { EventLog } from \"@nebutra/event-log\";\nimport { assetId } from \"@nebutra/generation-context\";\n\nexport type IdeaPublishLevel = \"surface\" | \"detail\" | \"cloneable\";\nexport type FeedSort = \"hot\" | \"new\" | \"near_you\";\nexport type { SensitiveField } from \"@nebutra/ecosystem-safety\";\nexport { scanForSensitiveFields } from \"@nebutra/ecosystem-safety\";\n\nexport interface CemeteryWarning {\n readonly title: string;\n readonly cause: string;\n}\n\nexport interface PublishIdeaRequest {\n readonly title: string;\n readonly oneLine: string;\n readonly level: IdeaPublishLevel;\n readonly body?: string;\n readonly tags: readonly string[];\n readonly redactions?: readonly string[];\n readonly cemeteryWarnings?: readonly CemeteryWarning[];\n}\n\nexport interface PublishedIdea {\n readonly ideaId: string;\n readonly title: string;\n readonly oneLine: string;\n readonly level: IdeaPublishLevel;\n readonly tags: readonly string[];\n readonly redactions: readonly string[];\n readonly cemeteryWarnings: readonly CemeteryWarning[];\n readonly publicationPath: string;\n readonly eventId: string;\n readonly publishedAt: string;\n}\n\nexport interface ForkRequest {\n readonly newFounderId: string;\n readonly inheritPlayPreferences?: boolean;\n}\n\nexport interface IdeaFork {\n readonly forkId: string;\n readonly sourceIdeaId: string;\n readonly newFounderId: string;\n readonly inheritPlayPreferences: boolean;\n readonly attribution: {\n readonly displayInNewCompany: true;\n readonly publicLineage: true;\n };\n readonly createdAt: string;\n}\n\nexport interface FeedRequest {\n readonly sort: FeedSort;\n readonly limit: number;\n}\n\nexport interface IdeaFeed {\n readonly items: readonly PublishedIdea[];\n}\n\nexport interface IdeaPlazaDoctorReport {\n readonly capability: \"idea-plaza\";\n readonly ok: boolean;\n readonly checkedAt: string;\n readonly features: readonly string[];\n readonly suggestion?: string;\n}\n\nexport interface IdeaPlazaOptions {\n readonly tenantId?: string;\n readonly debugRoot?: string;\n readonly contentStore?: ContentStore;\n readonly eventLog?: EventLog;\n}\n\nfunction bodyForScan(request: PublishIdeaRequest): string {\n return [request.title, request.oneLine, request.body ?? \"\", request.tags.join(\" \")].join(\"\\n\");\n}\n\nexport class IdeaPlaza {\n readonly #tenantId: string;\n readonly #debugRoot: string;\n readonly #contentStore: ContentStore;\n readonly #eventLog: EventLog;\n readonly #ideas = new Map<string, PublishedIdea>();\n readonly #forks = new Map<string, IdeaFork>();\n\n private constructor(\n options: Required<Pick<IdeaPlazaOptions, \"tenantId\" | \"contentStore\" | \"eventLog\">> &\n Pick<IdeaPlazaOptions, \"debugRoot\">,\n ) {\n this.#tenantId = requireCapabilityTenant({\n explicit: options.tenantId,\n onMissing: () =>\n new CapabilityError(\"idea-plaza\", \"Idea Plaza requires tenant context\", {\n suggestion: \"Pass tenantId so publish snapshots stay tenant-scoped.\",\n statusCode: 400,\n }),\n });\n this.#debugRoot = options.debugRoot ?? process.cwd();\n this.#contentStore = options.contentStore;\n this.#eventLog = options.eventLog;\n }\n\n static async open(\n root = \".nebutra/idea-plaza\",\n options: Omit<IdeaPlazaOptions, \"contentStore\" | \"eventLog\"> = {},\n ): Promise<IdeaPlaza> {\n const tenantId = options.tenantId ?? \"local\";\n await mkdir(root, { recursive: true });\n const contentStore = await ContentStore.open(join(root, \"content\"), { tenantId });\n const eventLog = await EventLog.open(join(root, \"event-log\"), { tenantId });\n return new IdeaPlaza({ ...options, tenantId, contentStore, eventLog });\n }\n\n async publish(request: PublishIdeaRequest): Promise<PublishedIdea> {\n assertPublicDisclosureSafe({\n capability: \"idea-plaza\",\n content: bodyForScan(request),\n ...(request.redactions !== undefined ? { redactions: request.redactions } : {}),\n suggestion: \"Review detected private values and pass redactions before publishing.\",\n });\n\n const ideaId = assetId(\"idea\", `${request.title}_${request.oneLine}`);\n const publicationPath = `plaza/ideas/${ideaId}.json`;\n const publishedAt = new Date().toISOString();\n const idea: Omit<PublishedIdea, \"eventId\"> = {\n ideaId,\n title: request.title,\n oneLine: request.oneLine,\n level: request.level,\n tags: request.tags,\n redactions: request.redactions ?? [],\n cemeteryWarnings: request.cemeteryWarnings ?? [],\n publicationPath,\n publishedAt,\n };\n const snapshot = `${JSON.stringify({ ...idea, body: request.body ?? \"\" }, null, 2)}\\n`;\n await this.#contentStore.write(publicationPath, snapshot);\n const eventId = await this.#eventLog.commit({\n traceId: assetId(\"idea_plaza_publish\", ideaId),\n kind: \"content_write\",\n affected: [publicationPath],\n parent: null,\n snapshot: { [publicationPath]: snapshot },\n });\n const published = { ...idea, eventId };\n this.#ideas.set(ideaId, published);\n await this.#debug({ type: \"publish\", tenantId: this.#tenantId, ideaId, level: request.level });\n return published;\n }\n\n async fork(ideaId: string, request: ForkRequest): Promise<IdeaFork> {\n if (!this.#ideas.has(ideaId)) {\n throw new CapabilityError(\"idea-plaza\", \"Idea fork source not found\", {\n suggestion: \"Fork only from an explicit public or cloneable snapshot in the current feed.\",\n metadata: { ideaId },\n statusCode: 404,\n });\n }\n const fork: IdeaFork = {\n forkId: assetId(\"idea_fork\", `${ideaId}_${request.newFounderId}`),\n sourceIdeaId: ideaId,\n newFounderId: request.newFounderId,\n inheritPlayPreferences: request.inheritPlayPreferences ?? false,\n attribution: {\n displayInNewCompany: true,\n publicLineage: true,\n },\n createdAt: new Date().toISOString(),\n };\n const path = `plaza/forks/${fork.forkId}.json`;\n const snapshot = `${JSON.stringify(fork, null, 2)}\\n`;\n await this.#contentStore.write(path, snapshot);\n await this.#eventLog.commit({\n traceId: assetId(\"idea_plaza_fork\", fork.forkId),\n kind: \"content_write\",\n affected: [path],\n parent: null,\n snapshot: { [path]: snapshot },\n });\n this.#forks.set(fork.forkId, fork);\n await this.#debug({ type: \"fork\", tenantId: this.#tenantId, ideaId, forkId: fork.forkId });\n return fork;\n }\n\n async feed(request: FeedRequest): Promise<IdeaFeed> {\n const items = [...this.#ideas.values()]\n .sort((left, right) =>\n request.sort === \"new\"\n ? right.publishedAt.localeCompare(left.publishedAt)\n : right.cemeteryWarnings.length - left.cemeteryWarnings.length ||\n right.publishedAt.localeCompare(left.publishedAt),\n )\n .slice(0, request.limit);\n await this.#debug({ type: \"feed\", tenantId: this.#tenantId, sort: request.sort });\n return { items };\n }\n\n async doctor(): Promise<IdeaPlazaDoctorReport> {\n const report: IdeaPlazaDoctorReport = {\n capability: \"idea-plaza\",\n ok: true,\n checkedAt: new Date().toISOString(),\n features: [\"publish\", \"redact\", \"fork-lineage\", \"feed\", \"cemetery-warning\"],\n suggestion:\n \"Local snapshots are active; public registry transport and moderation queues remain adapter handoffs.\",\n };\n await this.#debug({ type: \"doctor\", tenantId: this.#tenantId, ideas: this.#ideas.size });\n return report;\n }\n\n async close(): Promise<void> {\n await this.#contentStore.close();\n }\n\n async #debug(entry: Record<string, unknown>): Promise<void> {\n await appendCapabilityDebug(\"idea-plaza\", entry, { root: this.#debugRoot });\n }\n}\n\nexport async function readIdeaPlazaDebug(root = process.cwd(), limit = 20): Promise<unknown[]> {\n return readCapabilityDebug(\"idea-plaza\", { root, limit });\n}\n"],"mappings":";AAAA,SAAS,aAAa;AACtB,SAAS,YAAY;AACrB,SAAS,+BAA+B;AACxC,SAAS,uBAAuB,2BAA2B;AAC3D,SAAS,oBAAoB;AAC7B,SAAS,kCAAkC;AAC3C,SAAS,uBAAuB;AAChC,SAAS,gBAAgB;AACzB,SAAS,eAAe;AAKxB,SAAS,8BAA8B;AAuEvC,SAAS,YAAY,SAAqC;AACxD,SAAO,CAAC,QAAQ,OAAO,QAAQ,SAAS,QAAQ,QAAQ,IAAI,QAAQ,KAAK,KAAK,GAAG,CAAC,EAAE,KAAK,IAAI;AAC/F;AAEO,IAAM,YAAN,MAAM,WAAU;AA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;AACvF,WAAO;AAAA,EACT;AAAA,EAEA,MAAM,QAAuB;AAC3B,UAAM,KAAK,cAAc,MAAM;AAAA,EACjC;AAAA,EAEA,MAAM,OAAO,OAA+C;AAC1D,UAAM,sBAAsB,cAAc,OAAO,EAAE,MAAM,KAAK,WAAW,CAAC;AAAA,EAC5E;AACF;AAEA,eAAsB,mBAAmB,OAAO,QAAQ,IAAI,GAAG,QAAQ,IAAwB;AAC7F,SAAO,oBAAoB,cAAc,EAAE,MAAM,MAAM,CAAC;AAC1D;","names":[]}
package/dist/cli.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  IdeaPlaza,
3
3
  readIdeaPlazaDebug
4
- } from "./chunk-2WSISCFT.js";
4
+ } from "./chunk-ODTUJYW5.js";
5
5
 
6
6
  // src/cli.ts
7
7
  var command = process.argv[2] ?? "doctor";
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import {
2
2
  IdeaPlaza,
3
3
  readIdeaPlazaDebug,
4
4
  scanForSensitiveFields
5
- } from "./chunk-2WSISCFT.js";
5
+ } from "./chunk-ODTUJYW5.js";
6
6
  export {
7
7
  IdeaPlaza,
8
8
  readIdeaPlazaDebug,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nebutra/idea-plaza",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Explicit opt-in idea publishing, lineage, and fork surface over Nebutra company artifacts",
5
5
  "private": false,
6
6
  "license": "MIT",
@@ -30,12 +30,12 @@
30
30
  ".": "./src/index.ts"
31
31
  },
32
32
  "dependencies": {
33
- "@nebutra/capability-kit": "0.2.0",
34
- "@nebutra/content-store": "0.1.0",
35
- "@nebutra/ecosystem-safety": "0.1.0",
36
- "@nebutra/errors": "0.1.0",
37
- "@nebutra/event-log": "0.1.0",
38
- "@nebutra/generation-context": "0.1.0"
33
+ "@nebutra/capability-kit": "0.2.1",
34
+ "@nebutra/content-store": "0.1.1",
35
+ "@nebutra/ecosystem-safety": "0.1.1",
36
+ "@nebutra/errors": "0.1.1",
37
+ "@nebutra/event-log": "0.1.1",
38
+ "@nebutra/generation-context": "0.1.1"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@types/node": "^22.19.15",
package/src/index.ts CHANGED
@@ -1,5 +1,6 @@
1
1
  import { mkdir } from "node:fs/promises";
2
2
  import { join } from "node:path";
3
+ import { requireCapabilityTenant } from "@nebutra/capability-kit";
3
4
  import { appendCapabilityDebug, readCapabilityDebug } from "@nebutra/capability-kit/debug";
4
5
  import { ContentStore } from "@nebutra/content-store";
5
6
  import { assertPublicDisclosureSafe } from "@nebutra/ecosystem-safety";
@@ -81,16 +82,6 @@ export interface IdeaPlazaOptions {
81
82
  readonly eventLog?: EventLog;
82
83
  }
83
84
 
84
- function requireTenant(value: string | undefined): string {
85
- if (!value?.trim()) {
86
- throw new CapabilityError("idea-plaza", "Idea Plaza requires tenant context", {
87
- suggestion: "Pass tenantId so publish snapshots stay tenant-scoped.",
88
- statusCode: 400,
89
- });
90
- }
91
- return value;
92
- }
93
-
94
85
  function bodyForScan(request: PublishIdeaRequest): string {
95
86
  return [request.title, request.oneLine, request.body ?? "", request.tags.join(" ")].join("\n");
96
87
  }
@@ -107,7 +98,14 @@ export class IdeaPlaza {
107
98
  options: Required<Pick<IdeaPlazaOptions, "tenantId" | "contentStore" | "eventLog">> &
108
99
  Pick<IdeaPlazaOptions, "debugRoot">,
109
100
  ) {
110
- this.#tenantId = requireTenant(options.tenantId);
101
+ this.#tenantId = requireCapabilityTenant({
102
+ explicit: options.tenantId,
103
+ onMissing: () =>
104
+ new CapabilityError("idea-plaza", "Idea Plaza requires tenant context", {
105
+ suggestion: "Pass tenantId so publish snapshots stay tenant-scoped.",
106
+ statusCode: 400,
107
+ }),
108
+ });
111
109
  this.#debugRoot = options.debugRoot ?? process.cwd();
112
110
  this.#contentStore = options.contentStore;
113
111
  this.#eventLog = options.eventLog;
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { mkdir } from \"node:fs/promises\";\nimport { join } from \"node:path\";\nimport { appendCapabilityDebug, readCapabilityDebug } from \"@nebutra/capability-kit/debug\";\nimport { ContentStore } from \"@nebutra/content-store\";\nimport { assertPublicDisclosureSafe } from \"@nebutra/ecosystem-safety\";\nimport { CapabilityError } from \"@nebutra/errors\";\nimport { EventLog } from \"@nebutra/event-log\";\nimport { assetId } from \"@nebutra/generation-context\";\n\nexport type IdeaPublishLevel = \"surface\" | \"detail\" | \"cloneable\";\nexport type FeedSort = \"hot\" | \"new\" | \"near_you\";\nexport type { SensitiveField } from \"@nebutra/ecosystem-safety\";\nexport { scanForSensitiveFields } from \"@nebutra/ecosystem-safety\";\n\nexport interface CemeteryWarning {\n readonly title: string;\n readonly cause: string;\n}\n\nexport interface PublishIdeaRequest {\n readonly title: string;\n readonly oneLine: string;\n readonly level: IdeaPublishLevel;\n readonly body?: string;\n readonly tags: readonly string[];\n readonly redactions?: readonly string[];\n readonly cemeteryWarnings?: readonly CemeteryWarning[];\n}\n\nexport interface PublishedIdea {\n readonly ideaId: string;\n readonly title: string;\n readonly oneLine: string;\n readonly level: IdeaPublishLevel;\n readonly tags: readonly string[];\n readonly redactions: readonly string[];\n readonly cemeteryWarnings: readonly CemeteryWarning[];\n readonly publicationPath: string;\n readonly eventId: string;\n readonly publishedAt: string;\n}\n\nexport interface ForkRequest {\n readonly newFounderId: string;\n readonly inheritPlayPreferences?: boolean;\n}\n\nexport interface IdeaFork {\n readonly forkId: string;\n readonly sourceIdeaId: string;\n readonly newFounderId: string;\n readonly inheritPlayPreferences: boolean;\n readonly attribution: {\n readonly displayInNewCompany: true;\n readonly publicLineage: true;\n };\n readonly createdAt: string;\n}\n\nexport interface FeedRequest {\n readonly sort: FeedSort;\n readonly limit: number;\n}\n\nexport interface IdeaFeed {\n readonly items: readonly PublishedIdea[];\n}\n\nexport interface IdeaPlazaDoctorReport {\n readonly capability: \"idea-plaza\";\n readonly ok: boolean;\n readonly checkedAt: string;\n readonly features: readonly string[];\n readonly suggestion?: string;\n}\n\nexport interface IdeaPlazaOptions {\n readonly tenantId?: string;\n readonly debugRoot?: string;\n readonly contentStore?: ContentStore;\n readonly eventLog?: EventLog;\n}\n\nfunction requireTenant(value: string | undefined): string {\n if (!value?.trim()) {\n throw new CapabilityError(\"idea-plaza\", \"Idea Plaza requires tenant context\", {\n suggestion: \"Pass tenantId so publish snapshots stay tenant-scoped.\",\n statusCode: 400,\n });\n }\n return value;\n}\n\nfunction bodyForScan(request: PublishIdeaRequest): string {\n return [request.title, request.oneLine, request.body ?? \"\", request.tags.join(\" \")].join(\"\\n\");\n}\n\nexport class IdeaPlaza {\n readonly #tenantId: string;\n readonly #debugRoot: string;\n readonly #contentStore: ContentStore;\n readonly #eventLog: EventLog;\n readonly #ideas = new Map<string, PublishedIdea>();\n readonly #forks = new Map<string, IdeaFork>();\n\n private constructor(\n options: Required<Pick<IdeaPlazaOptions, \"tenantId\" | \"contentStore\" | \"eventLog\">> &\n Pick<IdeaPlazaOptions, \"debugRoot\">,\n ) {\n this.#tenantId = requireTenant(options.tenantId);\n this.#debugRoot = options.debugRoot ?? process.cwd();\n this.#contentStore = options.contentStore;\n this.#eventLog = options.eventLog;\n }\n\n static async open(\n root = \".nebutra/idea-plaza\",\n options: Omit<IdeaPlazaOptions, \"contentStore\" | \"eventLog\"> = {},\n ): Promise<IdeaPlaza> {\n const tenantId = options.tenantId ?? \"local\";\n await mkdir(root, { recursive: true });\n const contentStore = await ContentStore.open(join(root, \"content\"), { tenantId });\n const eventLog = await EventLog.open(join(root, \"event-log\"), { tenantId });\n return new IdeaPlaza({ ...options, tenantId, contentStore, eventLog });\n }\n\n async publish(request: PublishIdeaRequest): Promise<PublishedIdea> {\n assertPublicDisclosureSafe({\n capability: \"idea-plaza\",\n content: bodyForScan(request),\n ...(request.redactions !== undefined ? { redactions: request.redactions } : {}),\n suggestion: \"Review detected private values and pass redactions before publishing.\",\n });\n\n const ideaId = assetId(\"idea\", `${request.title}_${request.oneLine}`);\n const publicationPath = `plaza/ideas/${ideaId}.json`;\n const publishedAt = new Date().toISOString();\n const idea: Omit<PublishedIdea, \"eventId\"> = {\n ideaId,\n title: request.title,\n oneLine: request.oneLine,\n level: request.level,\n tags: request.tags,\n redactions: request.redactions ?? [],\n cemeteryWarnings: request.cemeteryWarnings ?? [],\n publicationPath,\n publishedAt,\n };\n const snapshot = `${JSON.stringify({ ...idea, body: request.body ?? \"\" }, null, 2)}\\n`;\n await this.#contentStore.write(publicationPath, snapshot);\n const eventId = await this.#eventLog.commit({\n traceId: assetId(\"idea_plaza_publish\", ideaId),\n kind: \"content_write\",\n affected: [publicationPath],\n parent: null,\n snapshot: { [publicationPath]: snapshot },\n });\n const published = { ...idea, eventId };\n this.#ideas.set(ideaId, published);\n await this.#debug({ type: \"publish\", tenantId: this.#tenantId, ideaId, level: request.level });\n return published;\n }\n\n async fork(ideaId: string, request: ForkRequest): Promise<IdeaFork> {\n if (!this.#ideas.has(ideaId)) {\n throw new CapabilityError(\"idea-plaza\", \"Idea fork source not found\", {\n suggestion: \"Fork only from an explicit public or cloneable snapshot in the current feed.\",\n metadata: { ideaId },\n statusCode: 404,\n });\n }\n const fork: IdeaFork = {\n forkId: assetId(\"idea_fork\", `${ideaId}_${request.newFounderId}`),\n sourceIdeaId: ideaId,\n newFounderId: request.newFounderId,\n inheritPlayPreferences: request.inheritPlayPreferences ?? false,\n attribution: {\n displayInNewCompany: true,\n publicLineage: true,\n },\n createdAt: new Date().toISOString(),\n };\n const path = `plaza/forks/${fork.forkId}.json`;\n const snapshot = `${JSON.stringify(fork, null, 2)}\\n`;\n await this.#contentStore.write(path, snapshot);\n await this.#eventLog.commit({\n traceId: assetId(\"idea_plaza_fork\", fork.forkId),\n kind: \"content_write\",\n affected: [path],\n parent: null,\n snapshot: { [path]: snapshot },\n });\n this.#forks.set(fork.forkId, fork);\n await this.#debug({ type: \"fork\", tenantId: this.#tenantId, ideaId, forkId: fork.forkId });\n return fork;\n }\n\n async feed(request: FeedRequest): Promise<IdeaFeed> {\n const items = [...this.#ideas.values()]\n .sort((left, right) =>\n request.sort === \"new\"\n ? right.publishedAt.localeCompare(left.publishedAt)\n : right.cemeteryWarnings.length - left.cemeteryWarnings.length ||\n right.publishedAt.localeCompare(left.publishedAt),\n )\n .slice(0, request.limit);\n await this.#debug({ type: \"feed\", tenantId: this.#tenantId, sort: request.sort });\n return { items };\n }\n\n async doctor(): Promise<IdeaPlazaDoctorReport> {\n const report: IdeaPlazaDoctorReport = {\n capability: \"idea-plaza\",\n ok: true,\n checkedAt: new Date().toISOString(),\n features: [\"publish\", \"redact\", \"fork-lineage\", \"feed\", \"cemetery-warning\"],\n suggestion:\n \"Local snapshots are active; public registry transport and moderation queues remain adapter handoffs.\",\n };\n await this.#debug({ type: \"doctor\", tenantId: this.#tenantId, ideas: this.#ideas.size });\n return report;\n }\n\n async close(): Promise<void> {\n await this.#contentStore.close();\n }\n\n async #debug(entry: Record<string, unknown>): Promise<void> {\n await appendCapabilityDebug(\"idea-plaza\", entry, { root: this.#debugRoot });\n }\n}\n\nexport async function readIdeaPlazaDebug(root = process.cwd(), limit = 20): Promise<unknown[]> {\n return readCapabilityDebug(\"idea-plaza\", { root, limit });\n}\n"],"mappings":";AAAA,SAAS,aAAa;AACtB,SAAS,YAAY;AACrB,SAAS,uBAAuB,2BAA2B;AAC3D,SAAS,oBAAoB;AAC7B,SAAS,kCAAkC;AAC3C,SAAS,uBAAuB;AAChC,SAAS,gBAAgB;AACzB,SAAS,eAAe;AAKxB,SAAS,8BAA8B;AAuEvC,SAAS,cAAc,OAAmC;AACxD,MAAI,CAAC,OAAO,KAAK,GAAG;AAClB,UAAM,IAAI,gBAAgB,cAAc,sCAAsC;AAAA,MAC5E,YAAY;AAAA,MACZ,YAAY;AAAA,IACd,CAAC;AAAA,EACH;AACA,SAAO;AACT;AAEA,SAAS,YAAY,SAAqC;AACxD,SAAO,CAAC,QAAQ,OAAO,QAAQ,SAAS,QAAQ,QAA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