@rubytech/create-maxy-code 0.1.504 → 0.1.506
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 +1 -1
- package/payload/platform/lib/account-schema-regions/dist/index.d.ts +60 -0
- package/payload/platform/lib/account-schema-regions/dist/index.d.ts.map +1 -0
- package/payload/platform/lib/account-schema-regions/dist/index.js +101 -0
- package/payload/platform/lib/account-schema-regions/dist/index.js.map +1 -0
- package/payload/platform/lib/account-schema-regions/package.json +7 -0
- package/payload/platform/lib/account-schema-regions/src/index.ts +121 -0
- package/payload/platform/lib/account-schema-regions/tsconfig.json +9 -0
- package/payload/platform/lib/models/dist/index.d.ts +5 -5
- package/payload/platform/lib/models/dist/index.d.ts.map +1 -1
- package/payload/platform/lib/models/dist/index.js +7 -7
- package/payload/platform/lib/models/dist/index.js.map +1 -1
- package/payload/platform/lib/models/src/index.ts +7 -7
- package/payload/platform/package.json +3 -3
- package/payload/platform/plugins/admin/skills/platform-architecture/SKILL.md +83 -28
- package/payload/platform/plugins/admin/skills/public-agent-manager/SKILL.md +5 -5
- package/payload/platform/plugins/admin/skills/whats-new/SKILL.md +12 -0
- package/payload/platform/plugins/docs/references/admin-session.md +1 -1
- package/payload/platform/plugins/docs/references/admin-ui.md +82 -27
- package/payload/platform/plugins/work/mcp/dist/__tests__/session-metering.test.js +2 -2
- package/payload/platform/plugins/work/mcp/dist/__tests__/session-metering.test.js.map +1 -1
- package/payload/platform/plugins/work/mcp/dist/index.js +1 -1
- package/payload/platform/plugins/work/mcp/dist/index.js.map +1 -1
- package/payload/platform/plugins/work/mcp/dist/tools/session-metering.js +2 -2
- package/payload/platform/plugins/work/mcp/dist/tools/session-metering.js.map +1 -1
- package/payload/platform/scripts/check-no-esm-require.mjs +5 -0
- package/payload/platform/scripts/logs-read-jsonl.test.sh +1 -1
- package/payload/platform/services/claude-session-manager/dist/account-dir-schema-reconcile.d.ts +1 -1
- package/payload/platform/services/claude-session-manager/dist/account-dir-schema-reconcile.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/account-dir-schema-reconcile.js +50 -3
- package/payload/platform/services/claude-session-manager/dist/account-dir-schema-reconcile.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/http-server.js +2 -2
- package/payload/platform/services/claude-session-manager/dist/http-server.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/pricing.d.ts +19 -11
- package/payload/platform/services/claude-session-manager/dist/pricing.d.ts.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/pricing.js +18 -15
- package/payload/platform/services/claude-session-manager/dist/pricing.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/rc-daemon.js +1 -1
- package/payload/platform/services/claude-session-manager/dist/rc-daemon.js.map +1 -1
- package/payload/platform/services/claude-session-manager/dist/session-metering.js +3 -3
- package/payload/platform/services/claude-session-manager/dist/session-metering.js.map +1 -1
- package/payload/platform/templates/account.json +1 -1
- package/payload/platform/templates/specialists/agents/coding-assistant.md +1 -1
- package/payload/platform/templates/specialists/agents/content-producer.md +1 -1
- package/payload/platform/templates/specialists/agents/librarian.md +1 -1
- package/payload/platform/templates/specialists/agents/research-assistant.md +1 -1
- package/payload/server/{chunk-HN4HFTXE.js → chunk-5ADBNEJA.js} +1410 -1409
- package/payload/server/maxy-edge.js +1 -1
- package/payload/server/public/activity.html +5 -5
- package/payload/server/public/agents.html +4 -4
- package/payload/server/public/assets/{AdminLoginScreens-DWMR4KtI.js → AdminLoginScreens-D5KOQA8S.js} +1 -1
- package/payload/server/public/assets/AdminShell-C8wazpnz.js +2 -0
- package/payload/server/public/assets/{activity-DH3z4cv3.js → activity-CFqkDhTs.js} +1 -1
- package/payload/server/public/assets/admin-B-EGUWS4.js +1 -0
- package/payload/server/public/assets/agents-DPulfmrd.js +1 -0
- package/payload/server/public/assets/{browser-C_MJYN5k.js → browser-T_5xbnJh.js} +1 -1
- package/payload/server/public/assets/{calendar-DA0h7dqW.js → calendar-CKjuiG8c.js} +1 -1
- package/payload/server/public/assets/chat-DWLYAA70.js +1 -0
- package/payload/server/public/assets/chevron-left-DBMCTKlT.js +1 -0
- package/payload/server/public/assets/chevron-right-SBAr6zzc.js +1 -0
- package/payload/server/public/assets/clock-kkzt7Scf.js +1 -0
- package/payload/server/public/assets/data-CV8N9qcy.js +1 -0
- package/payload/server/public/assets/{file-text-RCoSeOpD.js → file-text-c6cA4Evd.js} +1 -1
- package/payload/server/public/assets/graph-DIk-o45J.js +51 -0
- package/payload/server/public/assets/{graph-labels-DJV0aIG5.js → graph-labels-5bjxhC_p.js} +1 -1
- package/payload/server/public/assets/{maximize-2-DcESsKbu.js → maximize-2-BCQkFb1_.js} +1 -1
- package/payload/server/public/assets/{operator-Dlkw1sXJ.js → operator-0UnNo2ms.js} +1 -1
- package/payload/server/public/assets/page-HVtUfub2.js +32 -0
- package/payload/server/public/assets/page-JJa2xdzf.js +1 -0
- package/payload/server/public/assets/{public-C-UHWk_S.js → public-CKEYyIPn.js} +1 -1
- package/payload/server/public/assets/{rotate-ccw-C1nRSAzP.js → rotate-ccw-dTpO5dhL.js} +1 -1
- package/payload/server/public/assets/{routines-qdAZ0sA4.js → routines-C6P1-Dto.js} +1 -1
- package/payload/server/public/assets/{skills-B78wr822.js → skills-ClrpVqlz.js} +1 -1
- package/payload/server/public/assets/tasks-C8SNhSFC.js +1 -0
- package/payload/server/public/assets/{time-entry-format-BhlltPP8.js → time-entry-format-CCO6N6XZ.js} +1 -1
- package/payload/server/public/assets/{triangle-alert-rEVGyIhi.js → triangle-alert-CHjdKpag.js} +1 -1
- package/payload/server/public/assets/{useCopyFeedback-DzpXjm9d.js → useCopyFeedback-BTUu3-l8.js} +1 -1
- package/payload/server/public/assets/{useSubAccountSwitcher-DVmWZxar.js → useSubAccountSwitcher-DSW9vDi2.js} +1 -1
- package/payload/server/public/assets/{useSubAccountSwitcher-wP8cOzPj.css → useSubAccountSwitcher-DyrH8DA8.css} +1 -1
- package/payload/server/public/assets/{useVoiceRecorder-CRRmPjYr.js → useVoiceRecorder-BeNqxmm2.js} +1 -1
- package/payload/server/public/assets/{wrench-oeLti270.js → wrench-CeNnc7oO.js} +1 -1
- package/payload/server/public/browser.html +4 -4
- package/payload/server/public/calendar.html +7 -7
- package/payload/server/public/chat.html +13 -13
- package/payload/server/public/data.html +11 -11
- package/payload/server/public/graph.html +9 -9
- package/payload/server/public/index.html +14 -14
- package/payload/server/public/operator.html +14 -14
- package/payload/server/public/public.html +13 -13
- package/payload/server/public/routines.html +6 -6
- package/payload/server/public/skills.html +5 -5
- package/payload/server/public/tasks.html +6 -6
- package/payload/server/server.js +1395 -812
- package/payload/server/public/assets/AdminShell-C8hBpL9K.js +0 -2
- package/payload/server/public/assets/admin-aaGhd2Yh.js +0 -1
- package/payload/server/public/assets/agents-SPu-clsf.js +0 -1
- package/payload/server/public/assets/chat-Bg7dlM0I.js +0 -1
- package/payload/server/public/assets/chevron-left-BoDA12H8.js +0 -1
- package/payload/server/public/assets/chevron-right-DXjrO6qA.js +0 -1
- package/payload/server/public/assets/clock-BceBgZP1.js +0 -1
- package/payload/server/public/assets/data-rNLaurgY.js +0 -1
- package/payload/server/public/assets/graph-Dm-YZeNP.js +0 -51
- package/payload/server/public/assets/page-Dl-mgQUu.js +0 -32
- package/payload/server/public/assets/page-DoyJrk8E.js +0 -1
- package/payload/server/public/assets/tasks-DbIsS-vW.js +0 -1
package/package.json
CHANGED
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parser for the three machine-readable regions of an account's SCHEMA.md.
|
|
3
|
+
*
|
|
4
|
+
* Shared because two separate builds need the same answer: the admin UI server
|
|
5
|
+
* (platform/ui/server/lib/account-root-groups.ts, which groups the /data root
|
|
6
|
+
* into home/system) and the session manager's standing schema reconcile
|
|
7
|
+
* (platform/services/claude-session-manager/src/account-dir-schema-reconcile.ts,
|
|
8
|
+
* which audits declared-versus-on-disk parity). A third reader,
|
|
9
|
+
* platform/plugins/cloudflare/bin/schema-exposed-dirs.mjs, ships in a separate
|
|
10
|
+
* deploy tree and keeps its own copy; a parity test asserts the two agree.
|
|
11
|
+
*
|
|
12
|
+
* The regions are written by platform/scripts/lib/account-schema-owned-dirs.py
|
|
13
|
+
* merge(). Their separators differ:
|
|
14
|
+
*
|
|
15
|
+
* ontology roots: - `jobs/` - one folder per Job record. (ASCII hyphen)
|
|
16
|
+
* plugin-owned: - `pages/` — Owned by the … plugin. (em dash)
|
|
17
|
+
*
|
|
18
|
+
* .docs/data-portal-folder-index.md records that parsing the ontology region on
|
|
19
|
+
* the wrong separator matches nothing and reads as "this account has no
|
|
20
|
+
* deliverables". This parser sidesteps that failure entirely by anchoring on the
|
|
21
|
+
* backticked `dir/` head rather than the separator, and a test pins the
|
|
22
|
+
* behaviour so a future edit cannot reintroduce separator sensitivity.
|
|
23
|
+
*/
|
|
24
|
+
/**
|
|
25
|
+
* Operator-data buckets from the shipped template
|
|
26
|
+
* (platform/templates/account-schema/SCHEMA.md). They carry no ontology row
|
|
27
|
+
* because they are not entity buckets, but they hold the operator's own data,
|
|
28
|
+
* so they are home on every brand. On a vertical with no `## Top-level node
|
|
29
|
+
* types` table (schema-knowledge-work) they are the whole of home.
|
|
30
|
+
*
|
|
31
|
+
* Lives here rather than in either consumer because both the /data page and the
|
|
32
|
+
* standing reconcile audit must agree on the same set; a hand-synced copy in
|
|
33
|
+
* each build is precisely the drift this shared module exists to prevent.
|
|
34
|
+
*/
|
|
35
|
+
export declare const HOME_FIXED: readonly string[];
|
|
36
|
+
export interface SchemaRegions {
|
|
37
|
+
/** Root bucket dirs from the ontology region, in table order, deduped. */
|
|
38
|
+
ontologyRoots: string[];
|
|
39
|
+
/** Dirs from the plugin-owned region, in file order, deduped. */
|
|
40
|
+
pluginOwned: string[];
|
|
41
|
+
/** Entries of the ```allowed-top-level fence, in file order. */
|
|
42
|
+
allowedTopLevel: string[];
|
|
43
|
+
/**
|
|
44
|
+
* True when the allowed-top-level fence was found with at least one entry.
|
|
45
|
+
* That fence is present in every valid account SCHEMA.md (it ships in
|
|
46
|
+
* platform/templates/account-schema/SCHEMA.md), so its absence means the file
|
|
47
|
+
* is missing or not an account schema. An EMPTY ontology region is NOT a
|
|
48
|
+
* parse failure: a vertical with no `## Top-level node types` table (for
|
|
49
|
+
* example schema-knowledge-work) legitimately projects no buckets.
|
|
50
|
+
*/
|
|
51
|
+
parsed: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Why `parsed` is false, for the caller's log line. The two states need
|
|
54
|
+
* different remediation — provision the account versus regenerate its schema
|
|
55
|
+
* — so a single `status=parse-failed` cannot be acted on.
|
|
56
|
+
*/
|
|
57
|
+
reason: 'ok' | 'schema-absent' | 'fence-absent';
|
|
58
|
+
}
|
|
59
|
+
export declare function parseSchemaRegions(schemaMd: string | null): SchemaRegions;
|
|
60
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU,EAAE,SAAS,MAAM,EAAyD,CAAA;AAiBjG,MAAM,WAAW,aAAa;IAC5B,0EAA0E;IAC1E,aAAa,EAAE,MAAM,EAAE,CAAA;IACvB,iEAAiE;IACjE,WAAW,EAAE,MAAM,EAAE,CAAA;IACrB,gEAAgE;IAChE,eAAe,EAAE,MAAM,EAAE,CAAA;IACzB;;;;;;;OAOG;IACH,MAAM,EAAE,OAAO,CAAA;IACf;;;;OAIG;IACH,MAAM,EAAE,IAAI,GAAG,eAAe,GAAG,cAAc,CAAA;CAChD;AAiCD,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,GAAG,aAAa,CAazE"}
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Parser for the three machine-readable regions of an account's SCHEMA.md.
|
|
4
|
+
*
|
|
5
|
+
* Shared because two separate builds need the same answer: the admin UI server
|
|
6
|
+
* (platform/ui/server/lib/account-root-groups.ts, which groups the /data root
|
|
7
|
+
* into home/system) and the session manager's standing schema reconcile
|
|
8
|
+
* (platform/services/claude-session-manager/src/account-dir-schema-reconcile.ts,
|
|
9
|
+
* which audits declared-versus-on-disk parity). A third reader,
|
|
10
|
+
* platform/plugins/cloudflare/bin/schema-exposed-dirs.mjs, ships in a separate
|
|
11
|
+
* deploy tree and keeps its own copy; a parity test asserts the two agree.
|
|
12
|
+
*
|
|
13
|
+
* The regions are written by platform/scripts/lib/account-schema-owned-dirs.py
|
|
14
|
+
* merge(). Their separators differ:
|
|
15
|
+
*
|
|
16
|
+
* ontology roots: - `jobs/` - one folder per Job record. (ASCII hyphen)
|
|
17
|
+
* plugin-owned: - `pages/` — Owned by the … plugin. (em dash)
|
|
18
|
+
*
|
|
19
|
+
* .docs/data-portal-folder-index.md records that parsing the ontology region on
|
|
20
|
+
* the wrong separator matches nothing and reads as "this account has no
|
|
21
|
+
* deliverables". This parser sidesteps that failure entirely by anchoring on the
|
|
22
|
+
* backticked `dir/` head rather than the separator, and a test pins the
|
|
23
|
+
* behaviour so a future edit cannot reintroduce separator sensitivity.
|
|
24
|
+
*/
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.HOME_FIXED = void 0;
|
|
27
|
+
exports.parseSchemaRegions = parseSchemaRegions;
|
|
28
|
+
/**
|
|
29
|
+
* Operator-data buckets from the shipped template
|
|
30
|
+
* (platform/templates/account-schema/SCHEMA.md). They carry no ontology row
|
|
31
|
+
* because they are not entity buckets, but they hold the operator's own data,
|
|
32
|
+
* so they are home on every brand. On a vertical with no `## Top-level node
|
|
33
|
+
* types` table (schema-knowledge-work) they are the whole of home.
|
|
34
|
+
*
|
|
35
|
+
* Lives here rather than in either consumer because both the /data page and the
|
|
36
|
+
* standing reconcile audit must agree on the same set; a hand-synced copy in
|
|
37
|
+
* each build is precisely the drift this shared module exists to prevent.
|
|
38
|
+
*/
|
|
39
|
+
exports.HOME_FIXED = Object.freeze(['projects', 'contacts', 'documents']);
|
|
40
|
+
const ONT_START = '<!-- ontology-buckets:start -->';
|
|
41
|
+
const ONT_END = '<!-- ontology-buckets:end -->';
|
|
42
|
+
const PLUGIN_START = '<!-- plugin-owned-dirs:start -->';
|
|
43
|
+
const PLUGIN_END = '<!-- plugin-owned-dirs:end -->';
|
|
44
|
+
const ALLOWED_FENCE = '```allowed-top-level';
|
|
45
|
+
/**
|
|
46
|
+
* A region line declaring a directory: `- \`<dir>/\` …`. The trailing slash
|
|
47
|
+
* inside the backticks is what excludes a nested-entity line
|
|
48
|
+
* (`- \`Quote\` records live under \`jobs/\` …`), whose first backtick span is a
|
|
49
|
+
* bare label. Anything after the closing backtick is ignored, so both
|
|
50
|
+
* separators parse.
|
|
51
|
+
*/
|
|
52
|
+
const DIR_LINE = /^-\s+`([^`/]+)\/`/;
|
|
53
|
+
function regionLines(text, start, end) {
|
|
54
|
+
const from = text.indexOf(start);
|
|
55
|
+
if (from === -1)
|
|
56
|
+
return [];
|
|
57
|
+
const to = text.indexOf(end, from);
|
|
58
|
+
if (to === -1)
|
|
59
|
+
return [];
|
|
60
|
+
return text.slice(from + start.length, to).split('\n');
|
|
61
|
+
}
|
|
62
|
+
function dirsIn(lines) {
|
|
63
|
+
const out = [];
|
|
64
|
+
for (const line of lines) {
|
|
65
|
+
const m = DIR_LINE.exec(line.trim());
|
|
66
|
+
if (m && !out.includes(m[1]))
|
|
67
|
+
out.push(m[1]);
|
|
68
|
+
}
|
|
69
|
+
return out;
|
|
70
|
+
}
|
|
71
|
+
function fenceEntries(text) {
|
|
72
|
+
const from = text.indexOf(ALLOWED_FENCE);
|
|
73
|
+
if (from === -1)
|
|
74
|
+
return [];
|
|
75
|
+
const bodyStart = text.indexOf('\n', from);
|
|
76
|
+
if (bodyStart === -1)
|
|
77
|
+
return [];
|
|
78
|
+
const to = text.indexOf('```', bodyStart);
|
|
79
|
+
if (to === -1)
|
|
80
|
+
return [];
|
|
81
|
+
return text
|
|
82
|
+
.slice(bodyStart + 1, to)
|
|
83
|
+
.split('\n')
|
|
84
|
+
.map((s) => s.trim())
|
|
85
|
+
.filter((s) => s.length > 0);
|
|
86
|
+
}
|
|
87
|
+
function parseSchemaRegions(schemaMd) {
|
|
88
|
+
if (schemaMd === null || schemaMd.length === 0) {
|
|
89
|
+
return { ontologyRoots: [], pluginOwned: [], allowedTopLevel: [], parsed: false, reason: 'schema-absent' };
|
|
90
|
+
}
|
|
91
|
+
const allowedTopLevel = fenceEntries(schemaMd);
|
|
92
|
+
const parsed = allowedTopLevel.length > 0;
|
|
93
|
+
return {
|
|
94
|
+
ontologyRoots: dirsIn(regionLines(schemaMd, ONT_START, ONT_END)),
|
|
95
|
+
pluginOwned: dirsIn(regionLines(schemaMd, PLUGIN_START, PLUGIN_END)),
|
|
96
|
+
allowedTopLevel,
|
|
97
|
+
parsed,
|
|
98
|
+
reason: parsed ? 'ok' : 'fence-absent',
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;;;AAqFH,gDAaC;AAhGD;;;;;;;;;;GAUG;AACU,QAAA,UAAU,GAAsB,MAAM,CAAC,MAAM,CAAC,CAAC,UAAU,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC,CAAA;AAEjG,MAAM,SAAS,GAAG,iCAAiC,CAAA;AACnD,MAAM,OAAO,GAAG,+BAA+B,CAAA;AAC/C,MAAM,YAAY,GAAG,kCAAkC,CAAA;AACvD,MAAM,UAAU,GAAG,gCAAgC,CAAA;AACnD,MAAM,aAAa,GAAG,sBAAsB,CAAA;AAE5C;;;;;;GAMG;AACH,MAAM,QAAQ,GAAG,mBA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AC,CAAA;IACzC,IAAI,EAAE,KAAK,CAAC,CAAC;QAAE,OAAO,EAAE,CAAA;IACxB,OAAO,IAAI;SACR,KAAK,CAAC,SAAS,GAAG,CAAC,EAAE,EAAE,CAAC;SACxB,KAAK,CAAC,IAAI,CAAC;SACX,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;SACpB,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAA;AAChC,CAAC;AAED,SAAgB,kBAAkB,CAAC,QAAuB;IACxD,IAAI,QAAQ,KAAK,IAAI,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC/C,OAAO,EAAE,aAAa,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,eAAe,EAAE,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,CAAA;IAC5G,CAAC;IACD,MAAM,eAAe,GAAG,YAAY,CAAC,QAAQ,CAAC,CAAA;IAC9C,MAAM,MAAM,GAAG,eAAe,CAAC,MAAM,GAAG,CAAC,CAAA;IACzC,OAAO;QACL,aAAa,EAAE,MAAM,CAAC,WAAW,CAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,CAAC,CAAC;QAChE,WAAW,EAAE,MAAM,CAAC,WAAW,CAAC,QAAQ,EAAE,YAAY,EAAE,UAAU,CAAC,CAAC;QACpE,eAAe;QACf,MAAM;QACN,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc;KACvC,CAAA;AACH,CAAC"}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Parser for the three machine-readable regions of an account's SCHEMA.md.
|
|
3
|
+
*
|
|
4
|
+
* Shared because two separate builds need the same answer: the admin UI server
|
|
5
|
+
* (platform/ui/server/lib/account-root-groups.ts, which groups the /data root
|
|
6
|
+
* into home/system) and the session manager's standing schema reconcile
|
|
7
|
+
* (platform/services/claude-session-manager/src/account-dir-schema-reconcile.ts,
|
|
8
|
+
* which audits declared-versus-on-disk parity). A third reader,
|
|
9
|
+
* platform/plugins/cloudflare/bin/schema-exposed-dirs.mjs, ships in a separate
|
|
10
|
+
* deploy tree and keeps its own copy; a parity test asserts the two agree.
|
|
11
|
+
*
|
|
12
|
+
* The regions are written by platform/scripts/lib/account-schema-owned-dirs.py
|
|
13
|
+
* merge(). Their separators differ:
|
|
14
|
+
*
|
|
15
|
+
* ontology roots: - `jobs/` - one folder per Job record. (ASCII hyphen)
|
|
16
|
+
* plugin-owned: - `pages/` — Owned by the … plugin. (em dash)
|
|
17
|
+
*
|
|
18
|
+
* .docs/data-portal-folder-index.md records that parsing the ontology region on
|
|
19
|
+
* the wrong separator matches nothing and reads as "this account has no
|
|
20
|
+
* deliverables". This parser sidesteps that failure entirely by anchoring on the
|
|
21
|
+
* backticked `dir/` head rather than the separator, and a test pins the
|
|
22
|
+
* behaviour so a future edit cannot reintroduce separator sensitivity.
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Operator-data buckets from the shipped template
|
|
27
|
+
* (platform/templates/account-schema/SCHEMA.md). They carry no ontology row
|
|
28
|
+
* because they are not entity buckets, but they hold the operator's own data,
|
|
29
|
+
* so they are home on every brand. On a vertical with no `## Top-level node
|
|
30
|
+
* types` table (schema-knowledge-work) they are the whole of home.
|
|
31
|
+
*
|
|
32
|
+
* Lives here rather than in either consumer because both the /data page and the
|
|
33
|
+
* standing reconcile audit must agree on the same set; a hand-synced copy in
|
|
34
|
+
* each build is precisely the drift this shared module exists to prevent.
|
|
35
|
+
*/
|
|
36
|
+
export const HOME_FIXED: readonly string[] = Object.freeze(['projects', 'contacts', 'documents'])
|
|
37
|
+
|
|
38
|
+
const ONT_START = '<!-- ontology-buckets:start -->'
|
|
39
|
+
const ONT_END = '<!-- ontology-buckets:end -->'
|
|
40
|
+
const PLUGIN_START = '<!-- plugin-owned-dirs:start -->'
|
|
41
|
+
const PLUGIN_END = '<!-- plugin-owned-dirs:end -->'
|
|
42
|
+
const ALLOWED_FENCE = '```allowed-top-level'
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* A region line declaring a directory: `- \`<dir>/\` …`. The trailing slash
|
|
46
|
+
* inside the backticks is what excludes a nested-entity line
|
|
47
|
+
* (`- \`Quote\` records live under \`jobs/\` …`), whose first backtick span is a
|
|
48
|
+
* bare label. Anything after the closing backtick is ignored, so both
|
|
49
|
+
* separators parse.
|
|
50
|
+
*/
|
|
51
|
+
const DIR_LINE = /^-\s+`([^`/]+)\/`/
|
|
52
|
+
|
|
53
|
+
export interface SchemaRegions {
|
|
54
|
+
/** Root bucket dirs from the ontology region, in table order, deduped. */
|
|
55
|
+
ontologyRoots: string[]
|
|
56
|
+
/** Dirs from the plugin-owned region, in file order, deduped. */
|
|
57
|
+
pluginOwned: string[]
|
|
58
|
+
/** Entries of the ```allowed-top-level fence, in file order. */
|
|
59
|
+
allowedTopLevel: string[]
|
|
60
|
+
/**
|
|
61
|
+
* True when the allowed-top-level fence was found with at least one entry.
|
|
62
|
+
* That fence is present in every valid account SCHEMA.md (it ships in
|
|
63
|
+
* platform/templates/account-schema/SCHEMA.md), so its absence means the file
|
|
64
|
+
* is missing or not an account schema. An EMPTY ontology region is NOT a
|
|
65
|
+
* parse failure: a vertical with no `## Top-level node types` table (for
|
|
66
|
+
* example schema-knowledge-work) legitimately projects no buckets.
|
|
67
|
+
*/
|
|
68
|
+
parsed: boolean
|
|
69
|
+
/**
|
|
70
|
+
* Why `parsed` is false, for the caller's log line. The two states need
|
|
71
|
+
* different remediation — provision the account versus regenerate its schema
|
|
72
|
+
* — so a single `status=parse-failed` cannot be acted on.
|
|
73
|
+
*/
|
|
74
|
+
reason: 'ok' | 'schema-absent' | 'fence-absent'
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
function regionLines(text: string, start: string, end: string): string[] {
|
|
78
|
+
const from = text.indexOf(start)
|
|
79
|
+
if (from === -1) return []
|
|
80
|
+
const to = text.indexOf(end, from)
|
|
81
|
+
if (to === -1) return []
|
|
82
|
+
return text.slice(from + start.length, to).split('\n')
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function dirsIn(lines: string[]): string[] {
|
|
86
|
+
const out: string[] = []
|
|
87
|
+
for (const line of lines) {
|
|
88
|
+
const m = DIR_LINE.exec(line.trim())
|
|
89
|
+
if (m && !out.includes(m[1])) out.push(m[1])
|
|
90
|
+
}
|
|
91
|
+
return out
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function fenceEntries(text: string): string[] {
|
|
95
|
+
const from = text.indexOf(ALLOWED_FENCE)
|
|
96
|
+
if (from === -1) return []
|
|
97
|
+
const bodyStart = text.indexOf('\n', from)
|
|
98
|
+
if (bodyStart === -1) return []
|
|
99
|
+
const to = text.indexOf('```', bodyStart)
|
|
100
|
+
if (to === -1) return []
|
|
101
|
+
return text
|
|
102
|
+
.slice(bodyStart + 1, to)
|
|
103
|
+
.split('\n')
|
|
104
|
+
.map((s) => s.trim())
|
|
105
|
+
.filter((s) => s.length > 0)
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export function parseSchemaRegions(schemaMd: string | null): SchemaRegions {
|
|
109
|
+
if (schemaMd === null || schemaMd.length === 0) {
|
|
110
|
+
return { ontologyRoots: [], pluginOwned: [], allowedTopLevel: [], parsed: false, reason: 'schema-absent' }
|
|
111
|
+
}
|
|
112
|
+
const allowedTopLevel = fenceEntries(schemaMd)
|
|
113
|
+
const parsed = allowedTopLevel.length > 0
|
|
114
|
+
return {
|
|
115
|
+
ontologyRoots: dirsIn(regionLines(schemaMd, ONT_START, ONT_END)),
|
|
116
|
+
pluginOwned: dirsIn(regionLines(schemaMd, PLUGIN_START, PLUGIN_END)),
|
|
117
|
+
allowedTopLevel,
|
|
118
|
+
parsed,
|
|
119
|
+
reason: parsed ? 'ok' : 'fence-absent',
|
|
120
|
+
}
|
|
121
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const OPUS_MODEL = "claude-opus-
|
|
1
|
+
export declare const OPUS_MODEL = "claude-opus-5[1m]";
|
|
2
2
|
export declare const SONNET_MODEL = "claude-sonnet-5";
|
|
3
3
|
export declare const HAIKU_MODEL = "claude-haiku-4-5";
|
|
4
4
|
export declare const MODEL_CONTEXT_WINDOW: Record<string, number>;
|
|
@@ -18,8 +18,8 @@ export declare function modelDisplayName(id: string): string;
|
|
|
18
18
|
export declare const SELECTABLE_MODELS: readonly string[];
|
|
19
19
|
export declare function isSelectableModel(id: string): boolean;
|
|
20
20
|
/** Strip Claude Code's `[1m]` context-extension suffix so a selectable id
|
|
21
|
-
* (`claude-opus-
|
|
22
|
-
* (suffix stripped upstream → `claude-opus-
|
|
21
|
+
* (`claude-opus-5[1m]`) compares equal to the live API/JSONL `message.model`
|
|
22
|
+
* (suffix stripped upstream → `claude-opus-5`). Ids without the suffix pass
|
|
23
23
|
* through. The /chat picker uses this to decide whether a chosen model is a
|
|
24
24
|
* real change from the running one — a raw `selected !== live` compare is
|
|
25
25
|
* always true for `[1m]` models. */
|
|
@@ -27,8 +27,8 @@ export declare function baseModelId(id: string): string;
|
|
|
27
27
|
/** Map a model id (often the bare live id without `[1m]`) to its canonical
|
|
28
28
|
* *selectable* id by base-id match; returns the input unchanged when no
|
|
29
29
|
* selectable id shares its base. Lets the composer read-only row and the
|
|
30
|
-
* context-window lookup resolve a live `claude-opus-
|
|
31
|
-
* `claude-opus-
|
|
30
|
+
* context-window lookup resolve a live `claude-opus-5` back to
|
|
31
|
+
* `claude-opus-5[1m]` (display name + 1M window). */
|
|
32
32
|
export declare function canonicalModelId(id: string): string;
|
|
33
33
|
/** The 5 permission modes the /chat composer and re-seat fork may write. */
|
|
34
34
|
export declare const PERMISSION_MODES: readonly ["default", "acceptEdits", "plan", "auto", "bypassPermissions"];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,UAAU,sBAAsB,CAAC;AAC9C,eAAO,MAAM,YAAY,oBAAoB,CAAC;AAC9C,eAAO,MAAM,WAAW,qBAAqB,CAAC;AAO9C,eAAO,MAAM,oBAAoB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAIvD,CAAC;AAEF,wEAAwE;AACxE,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED;;qEAEqE;AACrE,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAItD,CAAC;AAEF;+DAC+D;AAC/D,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAEnD;AAED;;;mCAGmC;AACnC,eAAO,MAAM,iBAAiB,EAAE,SAAS,MAAM,EAA4C,CAAC;AAC5F,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAErD;AAED;;;;;qCAKqC;AACrC,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAE9C;AAED;;;;sDAIsD;AACtD,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,MAAM,CAEnD;AAaD,4EAA4E;AAC5E,eAAO,MAAM,gBAAgB,0EAA2E,CAAC;AACzG,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAC/D,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,cAAc,CAEvE;AAED,sDAAsD;AACtD,eAAO,MAAM,aAAa,6CAA8C,CAAC;AACzE,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AACzD,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,WAAW,CAEjE;AASD;kFACkF;AAClF,eAAO,MAAM,sBAAsB,qFAA4C,CAAC;AAChF,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,sBAAsB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE1E;oEACoE;AACpE,eAAO,MAAM,qBAAqB,4DAA6C,CAAC;AAChF,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAExE;;;;;yCAKyC;AACzC,eAAO,MAAM,yBAAyB,oDAAqC,CAAC;AAC5E,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,yBAAyB,CAAC,CAAC,MAAM,CAAC,CAAC;AAC/E,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,qBAAqB,CAErF"}
|
|
@@ -15,11 +15,11 @@ exports.isNewSessionEffortLevel = isNewSessionEffortLevel;
|
|
|
15
15
|
// Opus defaults to the 1M-context variant ([1m] is Claude Code's
|
|
16
16
|
// context-extension suffix, valid in settings.json "model" and agent
|
|
17
17
|
// frontmatter).
|
|
18
|
-
exports.OPUS_MODEL = "claude-opus-
|
|
18
|
+
exports.OPUS_MODEL = "claude-opus-5[1m]";
|
|
19
19
|
exports.SONNET_MODEL = "claude-sonnet-5";
|
|
20
20
|
exports.HAIKU_MODEL = "claude-haiku-4-5";
|
|
21
21
|
// Each value is the model's published max input tokens (its context window),
|
|
22
|
-
// taken from Anthropic's model documentation on 2026-07-
|
|
22
|
+
// taken from Anthropic's model documentation on 2026-07-25: Opus 5 and
|
|
23
23
|
// Sonnet 5 are 1M, Haiku 4.5 is 200k. Not inferred from observed usage. When
|
|
24
24
|
// adding a model, read its window from the Models API
|
|
25
25
|
// (GET /v1/models/{id} -> max_input_tokens) rather than assuming a family default.
|
|
@@ -36,7 +36,7 @@ function contextWindow(model) {
|
|
|
36
36
|
* native-CC model dropdown (Task 820). A lever id outside this map renders
|
|
37
37
|
* with its raw id as the label (the composer's append-fallback). */
|
|
38
38
|
exports.MODEL_DISPLAY_NAMES = {
|
|
39
|
-
[exports.OPUS_MODEL]: "Opus
|
|
39
|
+
[exports.OPUS_MODEL]: "Opus 5 (1M context)",
|
|
40
40
|
[exports.SONNET_MODEL]: "Sonnet 5",
|
|
41
41
|
[exports.HAIKU_MODEL]: "Haiku 4.5",
|
|
42
42
|
};
|
|
@@ -54,8 +54,8 @@ function isSelectableModel(id) {
|
|
|
54
54
|
return exports.SELECTABLE_MODELS.includes(id);
|
|
55
55
|
}
|
|
56
56
|
/** Strip Claude Code's `[1m]` context-extension suffix so a selectable id
|
|
57
|
-
* (`claude-opus-
|
|
58
|
-
* (suffix stripped upstream → `claude-opus-
|
|
57
|
+
* (`claude-opus-5[1m]`) compares equal to the live API/JSONL `message.model`
|
|
58
|
+
* (suffix stripped upstream → `claude-opus-5`). Ids without the suffix pass
|
|
59
59
|
* through. The /chat picker uses this to decide whether a chosen model is a
|
|
60
60
|
* real change from the running one — a raw `selected !== live` compare is
|
|
61
61
|
* always true for `[1m]` models. */
|
|
@@ -65,8 +65,8 @@ function baseModelId(id) {
|
|
|
65
65
|
/** Map a model id (often the bare live id without `[1m]`) to its canonical
|
|
66
66
|
* *selectable* id by base-id match; returns the input unchanged when no
|
|
67
67
|
* selectable id shares its base. Lets the composer read-only row and the
|
|
68
|
-
* context-window lookup resolve a live `claude-opus-
|
|
69
|
-
* `claude-opus-
|
|
68
|
+
* context-window lookup resolve a live `claude-opus-5` back to
|
|
69
|
+
* `claude-opus-5[1m]` (display name + 1M window). */
|
|
70
70
|
function canonicalModelId(id) {
|
|
71
71
|
return exports.SELECTABLE_MODELS.find((m) => baseModelId(m) === baseModelId(id)) ?? id;
|
|
72
72
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/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F;AAEjF;kFACkF;AACrE,QAAA,sBAAsB,GAAG,CAAC,GAAG,wBAAgB,EAAE,SAAS,CAAU,CAAC;AAGhF;oEACoE;AACvD,QAAA,qBAAqB,GAAG,CAAC,MAAM,EAAE,GAAG,qBAAa,EAAE,KAAK,CAAU,CAAC;AAGhF;;;;;yCAKyC;AAC5B,QAAA,yBAAyB,GAAG,CAAC,GAAG,qBAAa,EAAE,KAAK,CAAU,CAAC;AAE5E,SAAgB,uBAAuB,CAAC,KAAa;IACnD,OAAQ,iCAA+C,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAC1E,CAAC"}
|
|
@@ -5,12 +5,12 @@
|
|
|
5
5
|
// Opus defaults to the 1M-context variant ([1m] is Claude Code's
|
|
6
6
|
// context-extension suffix, valid in settings.json "model" and agent
|
|
7
7
|
// frontmatter).
|
|
8
|
-
export const OPUS_MODEL = "claude-opus-
|
|
8
|
+
export const OPUS_MODEL = "claude-opus-5[1m]";
|
|
9
9
|
export const SONNET_MODEL = "claude-sonnet-5";
|
|
10
10
|
export const HAIKU_MODEL = "claude-haiku-4-5";
|
|
11
11
|
|
|
12
12
|
// Each value is the model's published max input tokens (its context window),
|
|
13
|
-
// taken from Anthropic's model documentation on 2026-07-
|
|
13
|
+
// taken from Anthropic's model documentation on 2026-07-25: Opus 5 and
|
|
14
14
|
// Sonnet 5 are 1M, Haiku 4.5 is 200k. Not inferred from observed usage. When
|
|
15
15
|
// adding a model, read its window from the Models API
|
|
16
16
|
// (GET /v1/models/{id} -> max_input_tokens) rather than assuming a family default.
|
|
@@ -29,7 +29,7 @@ export function contextWindow(model: string): number {
|
|
|
29
29
|
* native-CC model dropdown (Task 820). A lever id outside this map renders
|
|
30
30
|
* with its raw id as the label (the composer's append-fallback). */
|
|
31
31
|
export const MODEL_DISPLAY_NAMES: Record<string, string> = {
|
|
32
|
-
[OPUS_MODEL]: "Opus
|
|
32
|
+
[OPUS_MODEL]: "Opus 5 (1M context)",
|
|
33
33
|
[SONNET_MODEL]: "Sonnet 5",
|
|
34
34
|
[HAIKU_MODEL]: "Haiku 4.5",
|
|
35
35
|
};
|
|
@@ -50,8 +50,8 @@ export function isSelectableModel(id: string): boolean {
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
/** Strip Claude Code's `[1m]` context-extension suffix so a selectable id
|
|
53
|
-
* (`claude-opus-
|
|
54
|
-
* (suffix stripped upstream → `claude-opus-
|
|
53
|
+
* (`claude-opus-5[1m]`) compares equal to the live API/JSONL `message.model`
|
|
54
|
+
* (suffix stripped upstream → `claude-opus-5`). Ids without the suffix pass
|
|
55
55
|
* through. The /chat picker uses this to decide whether a chosen model is a
|
|
56
56
|
* real change from the running one — a raw `selected !== live` compare is
|
|
57
57
|
* always true for `[1m]` models. */
|
|
@@ -62,8 +62,8 @@ export function baseModelId(id: string): string {
|
|
|
62
62
|
/** Map a model id (often the bare live id without `[1m]`) to its canonical
|
|
63
63
|
* *selectable* id by base-id match; returns the input unchanged when no
|
|
64
64
|
* selectable id shares its base. Lets the composer read-only row and the
|
|
65
|
-
* context-window lookup resolve a live `claude-opus-
|
|
66
|
-
* `claude-opus-
|
|
65
|
+
* context-window lookup resolve a live `claude-opus-5` back to
|
|
66
|
+
* `claude-opus-5[1m]` (display name + 1M window). */
|
|
67
67
|
export function canonicalModelId(id: string): string {
|
|
68
68
|
return SELECTABLE_MODELS.find((m) => baseModelId(m) === baseModelId(id)) ?? id;
|
|
69
69
|
}
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
"services/*"
|
|
7
7
|
],
|
|
8
8
|
"scripts": {
|
|
9
|
-
"build": "tsc -p lib/models/tsconfig.json && tsc -p lib/mcp-spawn-tee/tsconfig.json && tsc -p lib/mcp-lifeline/tsconfig.json && tsc -p lib/mcp-eager/tsconfig.json && tsc -p lib/account-enumeration/tsconfig.json && tsc -p lib/account-scope/tsconfig.json && tsc -p lib/graph-write/tsconfig.json && tsc -p lib/ledger-core/tsconfig.json && tsc -p lib/embed-client/tsconfig.json && tsc -p lib/graph-mcp/tsconfig.json && tsc -p lib/graph-trash/tsconfig.json && tsc -p lib/active-rules/tsconfig.json && tsc -p lib/admin-conversation-purge/tsconfig.json && tsc -p lib/graph-search/tsconfig.json && tsc -p lib/graph-style/tsconfig.json && tsc -p lib/device-url/tsconfig.json && tsc -p lib/brand-templating/tsconfig.json && tsc -p lib/entitlement/tsconfig.json && tsc -p lib/task-secrets/tsconfig.json && tsc -p lib/admins-write/tsconfig.json && tsc -p lib/admin-access-password/tsconfig.json && tsc -p lib/persistent-components/tsconfig.json && tsc -p lib/require-port-env/tsconfig.json && tsc -p lib/aeo-llms-txt-writer/tsconfig.json && tsc -p lib/obsidian-parser/tsconfig.json && tsc -p lib/storage-broker/tsconfig.json && tsc -p services/claude-session-manager/tsconfig.json && tsc -p services/whatsapp-channel/tsconfig.json && tsc -p services/webchat-channel/tsconfig.json && tsc -p services/telegram-channel/tsconfig.json && NODE_OPTIONS='--max-old-space-size=8192' tsc -b plugins/*/mcp/tsconfig.json",
|
|
10
|
-
"build:lib": "tsc -p lib/models/tsconfig.json && tsc -p lib/mcp-spawn-tee/tsconfig.json && tsc -p lib/mcp-lifeline/tsconfig.json && tsc -p lib/mcp-eager/tsconfig.json && tsc -p lib/account-enumeration/tsconfig.json && tsc -p lib/account-scope/tsconfig.json && tsc -p lib/graph-write/tsconfig.json && tsc -p lib/ledger-core/tsconfig.json && tsc -p lib/embed-client/tsconfig.json && tsc -p lib/graph-mcp/tsconfig.json && tsc -p lib/graph-trash/tsconfig.json && tsc -p lib/active-rules/tsconfig.json && tsc -p lib/admin-conversation-purge/tsconfig.json && tsc -p lib/graph-search/tsconfig.json && tsc -p lib/graph-style/tsconfig.json && tsc -p lib/device-url/tsconfig.json && tsc -p lib/brand-templating/tsconfig.json && tsc -p lib/entitlement/tsconfig.json && tsc -p lib/task-secrets/tsconfig.json && tsc -p lib/admins-write/tsconfig.json && tsc -p lib/admin-access-password/tsconfig.json && tsc -p lib/persistent-components/tsconfig.json && tsc -p lib/require-port-env/tsconfig.json && tsc -p lib/aeo-llms-txt-writer/tsconfig.json && tsc -p lib/obsidian-parser/tsconfig.json && tsc -p lib/storage-broker/tsconfig.json",
|
|
9
|
+
"build": "tsc -p lib/account-schema-regions/tsconfig.json && tsc -p lib/models/tsconfig.json && tsc -p lib/mcp-spawn-tee/tsconfig.json && tsc -p lib/mcp-lifeline/tsconfig.json && tsc -p lib/mcp-eager/tsconfig.json && tsc -p lib/account-enumeration/tsconfig.json && tsc -p lib/account-scope/tsconfig.json && tsc -p lib/graph-write/tsconfig.json && tsc -p lib/ledger-core/tsconfig.json && tsc -p lib/embed-client/tsconfig.json && tsc -p lib/graph-mcp/tsconfig.json && tsc -p lib/graph-trash/tsconfig.json && tsc -p lib/active-rules/tsconfig.json && tsc -p lib/admin-conversation-purge/tsconfig.json && tsc -p lib/graph-search/tsconfig.json && tsc -p lib/graph-style/tsconfig.json && tsc -p lib/device-url/tsconfig.json && tsc -p lib/brand-templating/tsconfig.json && tsc -p lib/entitlement/tsconfig.json && tsc -p lib/task-secrets/tsconfig.json && tsc -p lib/admins-write/tsconfig.json && tsc -p lib/admin-access-password/tsconfig.json && tsc -p lib/persistent-components/tsconfig.json && tsc -p lib/require-port-env/tsconfig.json && tsc -p lib/aeo-llms-txt-writer/tsconfig.json && tsc -p lib/obsidian-parser/tsconfig.json && tsc -p lib/storage-broker/tsconfig.json && tsc -p services/claude-session-manager/tsconfig.json && tsc -p services/whatsapp-channel/tsconfig.json && tsc -p services/webchat-channel/tsconfig.json && tsc -p services/telegram-channel/tsconfig.json && NODE_OPTIONS='--max-old-space-size=8192' tsc -b plugins/*/mcp/tsconfig.json",
|
|
10
|
+
"build:lib": "tsc -p lib/account-schema-regions/tsconfig.json && tsc -p lib/models/tsconfig.json && tsc -p lib/mcp-spawn-tee/tsconfig.json && tsc -p lib/mcp-lifeline/tsconfig.json && tsc -p lib/mcp-eager/tsconfig.json && tsc -p lib/account-enumeration/tsconfig.json && tsc -p lib/account-scope/tsconfig.json && tsc -p lib/graph-write/tsconfig.json && tsc -p lib/ledger-core/tsconfig.json && tsc -p lib/embed-client/tsconfig.json && tsc -p lib/graph-mcp/tsconfig.json && tsc -p lib/graph-trash/tsconfig.json && tsc -p lib/active-rules/tsconfig.json && tsc -p lib/admin-conversation-purge/tsconfig.json && tsc -p lib/graph-search/tsconfig.json && tsc -p lib/graph-style/tsconfig.json && tsc -p lib/device-url/tsconfig.json && tsc -p lib/brand-templating/tsconfig.json && tsc -p lib/entitlement/tsconfig.json && tsc -p lib/task-secrets/tsconfig.json && tsc -p lib/admins-write/tsconfig.json && tsc -p lib/admin-access-password/tsconfig.json && tsc -p lib/persistent-components/tsconfig.json && tsc -p lib/require-port-env/tsconfig.json && tsc -p lib/aeo-llms-txt-writer/tsconfig.json && tsc -p lib/obsidian-parser/tsconfig.json && tsc -p lib/storage-broker/tsconfig.json",
|
|
11
11
|
"gen:canonical-tools": "node scripts/generate-canonical-tool-names.mjs",
|
|
12
12
|
"build:memory": "tsc -p plugins/memory/mcp/tsconfig.json",
|
|
13
13
|
"build:contacts": "tsc -p plugins/contacts/mcp/tsconfig.json",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"build:replicate": "tsc -p plugins/replicate/mcp/tsconfig.json",
|
|
23
23
|
"build:graph-viewer": "tsc -p plugins/graph-viewer/mcp/tsconfig.json",
|
|
24
24
|
"build:claude-session-manager": "tsc -p services/claude-session-manager/tsconfig.json",
|
|
25
|
-
|
|
25
|
+
"build:whatsapp-channel": "tsc -p services/whatsapp-channel/tsconfig.json",
|
|
26
26
|
"build:webchat-channel": "tsc -p services/webchat-channel/tsconfig.json",
|
|
27
27
|
"build:telegram-channel": "tsc -p services/telegram-channel/tsconfig.json"
|
|
28
28
|
},
|