@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.
- package/.nebutra/debug/content-store.jsonl +5 -5
- package/.nebutra/debug/event-log.jsonl +2 -2
- package/.nebutra/debug/idea-plaza.jsonl +3 -3
- package/.turbo/turbo-build.log +5 -5
- package/.turbo/turbo-test.log +4 -6
- package/.turbo/turbo-typecheck.log +1 -1
- package/CHANGELOG.md +14 -0
- package/dist/{chunk-2WSISCFT.js → chunk-ODTUJYW5.js} +9 -11
- package/dist/chunk-ODTUJYW5.js.map +1 -0
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +7 -7
- package/src/index.ts +9 -11
- package/dist/chunk-2WSISCFT.js.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
{"at":"2026-05-
|
|
2
|
-
{"at":"2026-05-
|
|
3
|
-
{"at":"2026-05-
|
|
4
|
-
{"at":"2026-05-
|
|
5
|
-
{"at":"2026-05-
|
|
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":"
|
|
2
|
-
{"traceId":"
|
|
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-
|
|
2
|
-
{"at":"2026-05-
|
|
3
|
-
{"at":"2026-05-
|
|
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"}
|
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @nebutra/idea-plaza@0.1.
|
|
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
|
[34mCLI[39m Building entry: src/cli.ts, src/index.ts
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
[34mESM[39m Build start
|
|
12
12
|
[32mESM[39m [1mdist/cli.js [22m[32m1.20 KB[39m
|
|
13
13
|
[32mESM[39m [1mdist/index.js [22m[32m204.00 B[39m
|
|
14
|
-
[32mESM[39m [1mdist/chunk-
|
|
14
|
+
[32mESM[39m [1mdist/chunk-ODTUJYW5.js [22m[32m5.61 KB[39m
|
|
15
15
|
[32mESM[39m [1mdist/cli.js.map [22m[32m2.20 KB[39m
|
|
16
16
|
[32mESM[39m [1mdist/index.js.map [22m[32m71.00 B[39m
|
|
17
|
-
[32mESM[39m [1mdist/chunk-
|
|
18
|
-
[32mESM[39m ⚡️ Build success in
|
|
17
|
+
[32mESM[39m [1mdist/chunk-ODTUJYW5.js.map [22m[32m12.09 KB[39m
|
|
18
|
+
[32mESM[39m ⚡️ Build success in 81ms
|
|
19
19
|
[34mDTS[39m Build start
|
|
20
|
-
[32mDTS[39m ⚡️ Build success in
|
|
20
|
+
[32mDTS[39m ⚡️ Build success in 11957ms
|
|
21
21
|
[32mDTS[39m [1mdist/cli.d.ts [22m[32m13.00 B[39m
|
|
22
22
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m2.76 KB[39m
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,16 +1,14 @@
|
|
|
1
1
|
|
|
2
|
-
> @nebutra/idea-plaza@0.1.
|
|
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
|
[1m[30m[46m RUN [49m[39m[22m [36mv4.1.4 [39m[90m/home/runner/work/Nebutra-Sailor/Nebutra-Sailor/packages/ai/idea-plaza[39m
|
|
7
7
|
|
|
8
|
-
|
|
9
|
-
(Use `node --trace-warnings ...` to show where the warning was created)
|
|
10
|
-
[32m✓[39m src/index.test.ts [2m([22m[2m3 tests[22m[2m)[22m[33m 441[2mms[22m[39m
|
|
8
|
+
[32m✓[39m src/index.test.ts [2m([22m[2m3 tests[22m[2m)[22m[33m 501[2mms[22m[39m
|
|
11
9
|
|
|
12
10
|
[2m Test Files [22m [1m[32m1 passed[39m[22m[90m (1)[39m
|
|
13
11
|
[2m Tests [22m [1m[32m3 passed[39m[22m[90m (3)[39m
|
|
14
|
-
[2m Start at [22m
|
|
15
|
-
[2m Duration [22m 2.
|
|
12
|
+
[2m Start at [22m 08:15:19
|
|
13
|
+
[2m Duration [22m 2.36s[2m (transform 879ms, setup 0ms, import 1.05s, tests 501ms, environment 0ms)[22m
|
|
16
14
|
|
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 =
|
|
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-
|
|
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;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,SAAS,oBAAI,IAA2B;AAAA,EACxC,SAAS,oBAAI,IAAsB;AAAA,EAEpC,YACN,SAEA;AACA,SAAK,YAAY,wBAAwB;AAAA,MACvC,UAAU,QAAQ;AAAA,MAClB,WAAW,MACT,IAAI,gBAAgB,cAAc,sCAAsC;AAAA,QACtE,YAAY;AAAA,QACZ,YAAY;AAAA,MACd,CAAC;AAAA,IACL,CAAC;AACD,SAAK,aAAa,QAAQ,aAAa,QAAQ,IAAI;AACnD,SAAK,gBAAgB,QAAQ;AAC7B,SAAK,YAAY,QAAQ;AAAA,EAC3B;AAAA,EAEA,aAAa,KACX,OAAO,uBACP,UAA+D,CAAC,GAC5C;AACpB,UAAM,WAAW,QAAQ,YAAY;AACrC,UAAM,MAAM,MAAM,EAAE,WAAW,KAAK,CAAC;AACrC,UAAM,eAAe,MAAM,aAAa,KAAK,KAAK,MAAM,SAAS,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C,EACnC;AAAA,MAAK,CAAC,MAAM,UACX,QAAQ,SAAS,QACb,MAAM,YAAY,cAAc,KAAK,WAAW,IAChD,MAAM,iBAAiB,SAAS,KAAK,iBAAiB,UACtD,MAAM,YAAY,cAAc,KAAK,WAAW;AAAA,IACtD,EACC,MAAM,GAAG,QAAQ,KAAK;AACzB,UAAM,KAAK,OAAO,EAAE,MAAM,QAAQ,UAAU,KAAK,WAAW,MAAM,QAAQ,KAAK,CAAC;AAChF,WAAO,EAAE,MAAM;AAAA,EACjB;AAAA,EAEA,MAAM,SAAyC;AAC7C,UAAM,SAAgC;AAAA,MACpC,YAAY;AAAA,MACZ,IAAI;AAAA,MACJ,YAAW,oBAAI,KAAK,GAAE,YAAY;AAAA,MAClC,UAAU,CAAC,WAAW,UAAU,gBAAgB,QAAQ,kBAAkB;AAAA,MAC1E,YACE;AAAA,IACJ;AACA,UAAM,KAAK,OAAO,EAAE,MAAM,UAAU,UAAU,KAAK,WAAW,OAAO,KAAK,OAAO,KAAK,CAAC;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
package/dist/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nebutra/idea-plaza",
|
|
3
|
-
"version": "0.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.
|
|
34
|
-
"@nebutra/content-store": "0.1.
|
|
35
|
-
"@nebutra/ecosystem-safety": "0.1.
|
|
36
|
-
"@nebutra/errors": "0.1.
|
|
37
|
-
"@nebutra/event-log": "0.1.
|
|
38
|
-
"@nebutra/generation-context": "0.1.
|
|
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 =
|
|
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,QAAQ,IAAI,QAAQ,KAAK,KAAK,GAAG,CAAC,EAAE,KAAK,IAAI;AAC/F;AAEO,IAAM,YAAN,MAAM,WAAU;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,SAAS,oBAAI,IAA2B;AAAA,EACxC,SAAS,oBAAI,IAAsB;AAAA,EAEpC,YACN,SAEA;AACA,SAAK,YAAY,cAAc,QAAQ,QAAQ;AAC/C,SAAK,aAAa,QAAQ,aAAa,QAAQ,IAAI;AACnD,SAAK,gBAAgB,QAAQ;AAC7B,SAAK,YAAY,QAAQ;AAAA,EAC3B;AAAA,EAEA,aAAa,KACX,OAAO,uBACP,UAA+D,CAAC,GAC5C;AACpB,UAAM,WAAW,QAAQ,YAAY;AACrC,UAAM,MAAM,MAAM,EAAE,WAAW,KAAK,CAAC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