total-recall-brain 3.47.0 ā 3.47.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/bin/total-recall.mjs +5 -0
- package/package.json +1 -1
- package/scaffold/.agent/skills/total-recall/plugins/auth/package-lock.json +4 -4
- package/scaffold/.agent/skills/total-recall/plugins/auth/package.json +3 -2
- package/scaffold/.agent/skills/total-recall/plugins/auth/plugin.json +30 -5
- package/scaffold/.agent/skills/total-recall/plugins/auth/skills/auth/SKILL.md +35 -0
- package/scaffold/.agent/skills/total-recall/plugins/auth/ui/home.js +494 -79
- package/scaffold/.agent/skills/total-recall/plugins/automations/package-lock.json +4 -4
- package/scaffold/.agent/skills/total-recall/plugins/automations/package.json +3 -2
- package/scaffold/.agent/skills/total-recall/plugins/automations/plugin.json +33 -8
- package/scaffold/.agent/skills/total-recall/plugins/automations/skills/automations/SKILL.md +29 -0
- package/scaffold/.agent/skills/total-recall/plugins/automations/ui/chunks/dream-consolidation.md +17 -0
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/package-lock.json +4 -4
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/package.json +3 -2
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/plugin.json +31 -4
- package/scaffold/.agent/skills/total-recall/plugins/code-quality/skills/code-quality/SKILL.md +27 -0
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/package-lock.json +4 -4
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/package.json +1 -1
- package/scaffold/.agent/skills/total-recall/plugins/composable-cli/plugin.json +17 -3
- package/scaffold/.agent/skills/total-recall/plugins/embeddings/package-lock.json +4 -4
- package/scaffold/.agent/skills/total-recall/plugins/embeddings/package.json +3 -2
- package/scaffold/.agent/skills/total-recall/plugins/embeddings/plugin.json +24 -4
- package/scaffold/.agent/skills/total-recall/plugins/embeddings/skills/embeddings/SKILL.md +25 -0
- package/scaffold/.agent/skills/total-recall/plugins/git/package-lock.json +4 -4
- package/scaffold/.agent/skills/total-recall/plugins/git/package.json +3 -2
- package/scaffold/.agent/skills/total-recall/plugins/git/plugin.json +293 -58
- package/scaffold/.agent/skills/total-recall/plugins/git/skills/git/SKILL.md +36 -0
- package/scaffold/.agent/skills/total-recall/plugins/mesh/package-lock.json +4 -4
- package/scaffold/.agent/skills/total-recall/plugins/mesh/package.json +3 -2
- package/scaffold/.agent/skills/total-recall/plugins/mesh/plugin.json +47 -14
- package/scaffold/.agent/skills/total-recall/plugins/mesh/skills/mesh/SKILL.md +36 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/cli.mjs +6 -3
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/package-lock.json +6 -6
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/package.json +1 -1
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/plugin.json +5 -2
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/cascade.mjs +4 -2
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/coordinator.mjs +28 -9
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/dispatch.mjs +8 -2
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/included-usage.mjs +2 -2
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/learner.mjs +7 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/model-selection.mjs +59 -0
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/pool.mjs +2 -2
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/remote-operation.mjs +3 -3
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/router.mjs +11 -5
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/src/worker.mjs +50 -6
- package/scaffold/.agent/skills/total-recall/plugins/meta-harness/ui/chunks/session-controls.md +16 -0
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/cli.mjs +56 -7
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/package-lock.json +6 -6
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/package.json +3 -2
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/plugin.json +199 -36
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/skills/openwiki/SKILL.md +32 -0
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/config.mjs +34 -8
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/generate.mjs +6 -0
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/refresh.mjs +15 -7
- package/scaffold/.agent/skills/total-recall/plugins/openwiki/src/upstream-watcher.mjs +4 -3
- package/scaffold/.agent/skills/total-recall/plugins/security/package-lock.json +4 -4
- package/scaffold/.agent/skills/total-recall/plugins/security/package.json +1 -1
- package/scaffold/.agent/skills/total-recall/plugins/security/plugin.json +22 -5
- package/scaffold/.agent/skills/total-recall/plugins/ssss/package.json +3 -2
- package/scaffold/.agent/skills/total-recall/plugins/ssss/plugin.json +169 -37
- package/scaffold/.agent/skills/total-recall/plugins/ssss/skills/ssss/SKILL.md +30 -0
- package/src/cli/plugin/create.mjs +2 -1
- package/src/cli/plugin/monetization.mjs +66 -32
- package/src/cli/plugin/search.mjs +25 -3
- package/src/cli/preflight.mjs +40 -6
- package/src/cli/update.mjs +20 -1
- package/src/core/automatic-brain-updates.mjs +8 -4
- package/src/core/brain-updates.mjs +25 -6
- package/src/core/gate-mode.mjs +13 -24
- package/src/core/plugin-distribution.mjs +35 -1
- package/src/core/preflight-gate.mjs +28 -8
- package/src/core/preflight-receipt.mjs +11 -0
- package/src/core/release-defaults-handoff.mjs +89 -0
|
@@ -165,7 +165,7 @@ export function registryPath(home = os.homedir()) {
|
|
|
165
165
|
* Read the registered projects. The registry is the same source the updater
|
|
166
166
|
* uses to reach every consumer, so fleet scope is defined in exactly one place.
|
|
167
167
|
*/
|
|
168
|
-
export function readProjects({ registry = registryPath() } = {}) {
|
|
168
|
+
export function readProjects({ registry = registryPath(), exclude = null } = {}) {
|
|
169
169
|
let raw;
|
|
170
170
|
try {
|
|
171
171
|
raw = fs.readFileSync(registry, 'utf8');
|
|
@@ -188,14 +188,18 @@ export function readProjects({ registry = registryPath() } = {}) {
|
|
|
188
188
|
}
|
|
189
189
|
// One project per root: the registry has historically held duplicates.
|
|
190
190
|
const seen = new Set();
|
|
191
|
+
const excluded = new Set((exclude ?? loadOpenWikiConfig().exclude ?? []).map((root) => path.resolve(root)));
|
|
191
192
|
return projects.filter((p) => {
|
|
192
193
|
const key = path.resolve(p.root);
|
|
193
194
|
if (seen.has(key)) return false;
|
|
194
195
|
seen.add(key);
|
|
195
196
|
return true;
|
|
196
|
-
});
|
|
197
|
+
}).map((p) => ({ ...p, excluded: excluded.has(path.resolve(p.root)) }));
|
|
197
198
|
}
|
|
198
199
|
|
|
200
|
+
export const EXCLUDED = "excluded from OpenWiki (total-recall openwiki exclude --remove <name> to include it)";
|
|
201
|
+
export const NO_WIKI = "no finished wiki; the nightly refresh only updates existing wikis. Create one with: total-recall openwiki generate --repo <name>";
|
|
202
|
+
|
|
199
203
|
/** Does this project carry generated Markdown pages? */
|
|
200
204
|
export function hasWiki(root) {
|
|
201
205
|
const dir = path.join(root, 'openwiki');
|
|
@@ -608,17 +612,21 @@ export function lastAttemptStart(root, generatedAt = null) {
|
|
|
608
612
|
* runner killed the same generations every 30 minutes and they never finished.
|
|
609
613
|
*/
|
|
610
614
|
export function isDue(project, { lockMs = DEFAULT_LOCK_MS, now = Date.now(), git = gitRun, force = false } = {}) {
|
|
615
|
+
if (project.excluded) return { due: false, excluded: true, reason: EXCLUDED };
|
|
611
616
|
if (!isGitRepo(project.root, { git })) {
|
|
612
617
|
return { due: false, skipped: true, reason: 'not a git repository' };
|
|
613
618
|
}
|
|
614
619
|
const state = staleness(project.root, { git });
|
|
615
|
-
|
|
620
|
+
// Creating a wiki is the most expensive run there is, and a registered
|
|
621
|
+
// repository may be someone else's code. Only an explicit `openwiki generate`
|
|
622
|
+
// creates one or finishes an interrupted creation; refresh, --force included,
|
|
623
|
+
// only updates finished wikis.
|
|
624
|
+
if (generationMode(project.root) === 'init') {
|
|
625
|
+
return { due: false, uninitialized: true, ...state, reason: NO_WIKI };
|
|
626
|
+
}
|
|
627
|
+
if (force) return { due: true, uninitialized: false, ...state };
|
|
616
628
|
const last = lastAttemptStart(project.root, state.generatedAt);
|
|
617
629
|
const retryAt = Number.isFinite(last) && now - last < lockMs ? new Date(last + lockMs).toISOString() : null;
|
|
618
|
-
if (!hasWiki(project.root)) {
|
|
619
|
-
if (retryAt) return { due: false, held: true, uninitialized: true, reason: `initialization attempted recently; next attempt after ${retryAt}`, ...state };
|
|
620
|
-
return { due: true, uninitialized: true, reason: 'uninitialized (missing openwiki/ pages)', ...state };
|
|
621
|
-
}
|
|
622
630
|
if (!state.stale) return { due: false, ...state };
|
|
623
631
|
const incomplete = state.generatedStatus === 'interrupted' || stillGenerating(project.root);
|
|
624
632
|
if (retryAt) {
|
|
@@ -10,7 +10,7 @@ import os from 'node:os';
|
|
|
10
10
|
import path from 'node:path';
|
|
11
11
|
import { spawnSync } from 'node:child_process';
|
|
12
12
|
import { compareSemanticVersions, formatPropagationReceipt } from '../capability/index.mjs';
|
|
13
|
-
import { CREDIT_REFUSAL,
|
|
13
|
+
import { CREDIT_REFUSAL, generationMode, readProjects, refreshProject, resolveKey } from './refresh.mjs';
|
|
14
14
|
|
|
15
15
|
export const UPSTREAM_NPM_URL = 'https://registry.npmjs.org/openwiki/latest';
|
|
16
16
|
export const UPSTREAM_GITHUB_URL = 'https://api.github.com/repos/langchain-ai/openwiki/releases/latest';
|
|
@@ -338,8 +338,9 @@ export async function propagateUpdates({
|
|
|
338
338
|
}
|
|
339
339
|
}
|
|
340
340
|
|
|
341
|
-
//
|
|
342
|
-
|
|
341
|
+
// Only finished wikis outside the exclude list: propagation updates pages,
|
|
342
|
+
// it never creates a wiki or documents an excluded clone, fork or backup.
|
|
343
|
+
const eligible = projects.filter(p => !p.excluded && generationMode(p.root) === 'update');
|
|
343
344
|
if (eligible.length === 0) {
|
|
344
345
|
return {
|
|
345
346
|
ok: true,
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"jsdom": "^26.1.0",
|
|
16
|
-
"total-recall-brain": "3.
|
|
16
|
+
"total-recall-brain": "3.47.0"
|
|
17
17
|
}
|
|
18
18
|
},
|
|
19
19
|
"node_modules/@alcalzone/ansi-tokenize": {
|
|
@@ -5698,9 +5698,9 @@
|
|
|
5698
5698
|
}
|
|
5699
5699
|
},
|
|
5700
5700
|
"node_modules/total-recall-brain": {
|
|
5701
|
-
"version": "3.
|
|
5702
|
-
"resolved": "https://registry.npmjs.org/total-recall-brain/-/total-recall-brain-3.
|
|
5703
|
-
"integrity": "sha512-
|
|
5701
|
+
"version": "3.47.0",
|
|
5702
|
+
"resolved": "https://registry.npmjs.org/total-recall-brain/-/total-recall-brain-3.47.0.tgz",
|
|
5703
|
+
"integrity": "sha512-S4UIdbbTyxw7C4+rix+7oHMm/6gYkcxwNBcP6kRDySX40p5IgqVTKgHk1n8rmaKiyYFoIX/HZHlHSjNrHgn0Gw==",
|
|
5704
5704
|
"dev": true,
|
|
5705
5705
|
"license": "MIT",
|
|
5706
5706
|
"workspaces": [
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tr-plugin-security",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Standalone security suite for Total Recall: static analysis, file and permission hardening schemes, AES-256-GCM encryption tools, and egress audit controls",
|
|
6
6
|
"scripts": {
|
|
@@ -2,10 +2,16 @@
|
|
|
2
2
|
"$schema": "https://github.com/gregiteen/total-recall/blob/main/metadata.plugin.schema.json",
|
|
3
3
|
"id": "security",
|
|
4
4
|
"name": "Security Assessments",
|
|
5
|
-
"version": "0.4.
|
|
5
|
+
"version": "0.4.1",
|
|
6
6
|
"description": "Machine and device security assessments for macOS, Linux, Windows, Android, Chromebook, iPhone and iPad, with explicit measured and manual coverage.",
|
|
7
7
|
"license": "MIT",
|
|
8
|
-
"
|
|
8
|
+
"reuse": {
|
|
9
|
+
"commands": [
|
|
10
|
+
"total-recall auth secret",
|
|
11
|
+
"total-recall ssss status"
|
|
12
|
+
],
|
|
13
|
+
"owned": "Machine and device security assessments, header probes, and security evidence audits across platforms."
|
|
14
|
+
},
|
|
9
15
|
"branding": {
|
|
10
16
|
"name": "Security Assessments",
|
|
11
17
|
"color": "#31564b",
|
|
@@ -66,10 +72,21 @@
|
|
|
66
72
|
}
|
|
67
73
|
],
|
|
68
74
|
"gate": {
|
|
69
|
-
"tasks": [
|
|
75
|
+
"tasks": [
|
|
76
|
+
"Audit a machine, network or the fleet",
|
|
77
|
+
"Scan installed plugins or a source folder",
|
|
78
|
+
"Harden SSH permissions",
|
|
79
|
+
"Audit or protect a website you are authorized to test"
|
|
80
|
+
],
|
|
70
81
|
"owned_commands": [
|
|
71
|
-
{
|
|
72
|
-
|
|
82
|
+
{
|
|
83
|
+
"pattern": "nmap\\s",
|
|
84
|
+
"use": "total-recall security network --json"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"pattern": "lynis\\s",
|
|
88
|
+
"use": "total-recall security machine --json"
|
|
89
|
+
}
|
|
73
90
|
]
|
|
74
91
|
},
|
|
75
92
|
"cli": {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "tr-plugin-ssss",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Canonical SSSS distribution, scaffolding and validation for Total Recall installations.",
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
"scripts/",
|
|
13
13
|
"cli.mjs",
|
|
14
14
|
"DESIGN.md",
|
|
15
|
-
"plugin.json"
|
|
15
|
+
"plugin.json",
|
|
16
|
+
"skills/"
|
|
16
17
|
],
|
|
17
18
|
"scripts": {
|
|
18
19
|
"test": "node scripts/refresh-scaffold.mjs --check && node --test test/*.test.mjs",
|
|
@@ -2,15 +2,29 @@
|
|
|
2
2
|
"$schema": "https://github.com/gregiteen/total-recall/blob/main/metadata.plugin.schema.json",
|
|
3
3
|
"id": "ssss",
|
|
4
4
|
"name": "SSSS",
|
|
5
|
-
"version": "0.2.
|
|
5
|
+
"version": "0.2.1",
|
|
6
6
|
"description": "Canonical SSSS distribution, scaffolding and validation for Total Recall installations.",
|
|
7
7
|
"license": "MIT",
|
|
8
|
-
"use_cases": [
|
|
9
|
-
|
|
8
|
+
"use_cases": [
|
|
9
|
+
"software-development",
|
|
10
|
+
"state-conformance"
|
|
11
|
+
],
|
|
12
|
+
"distribution": {
|
|
13
|
+
"tier": "core",
|
|
14
|
+
"license": "open"
|
|
15
|
+
},
|
|
10
16
|
"gate": {
|
|
11
|
-
"tasks": [
|
|
17
|
+
"tasks": [
|
|
18
|
+
"Validate SSSS documents and registries",
|
|
19
|
+
"Scaffold a standalone SSSS project",
|
|
20
|
+
"Run the SSSS conformance suites",
|
|
21
|
+
"Restore a missing SSSS skill or scaffold"
|
|
22
|
+
],
|
|
12
23
|
"owned_commands": [
|
|
13
|
-
{
|
|
24
|
+
{
|
|
25
|
+
"pattern": "npx\\s+(--yes\\s+)?@gregiteen/ssss-cli\\s+new\\b",
|
|
26
|
+
"use": "total-recall ssss scaffold --directory <folder> --json"
|
|
27
|
+
}
|
|
14
28
|
]
|
|
15
29
|
},
|
|
16
30
|
"cli": {
|
|
@@ -19,65 +33,183 @@
|
|
|
19
33
|
"handler": "cli.mjs",
|
|
20
34
|
"subcommands": [
|
|
21
35
|
{
|
|
22
|
-
"name": "status",
|
|
23
|
-
"
|
|
24
|
-
"
|
|
36
|
+
"name": "status",
|
|
37
|
+
"description": "Inspect the installed engine, skill and full scaffold",
|
|
38
|
+
"effect": "read",
|
|
39
|
+
"output": "json",
|
|
40
|
+
"args": [
|
|
41
|
+
{
|
|
42
|
+
"name": "scope",
|
|
43
|
+
"flag": "--scope",
|
|
44
|
+
"label": "Brain scope",
|
|
45
|
+
"type": "choice",
|
|
46
|
+
"options": [
|
|
47
|
+
"auto",
|
|
48
|
+
"project",
|
|
49
|
+
"global"
|
|
50
|
+
]
|
|
51
|
+
}
|
|
52
|
+
]
|
|
25
53
|
},
|
|
26
54
|
{
|
|
27
|
-
"name": "repair",
|
|
28
|
-
"
|
|
29
|
-
"
|
|
55
|
+
"name": "repair",
|
|
56
|
+
"description": "Restore missing or previously repinned managed SSSS installation files",
|
|
57
|
+
"effect": "write",
|
|
58
|
+
"output": "json",
|
|
59
|
+
"args": [
|
|
60
|
+
{
|
|
61
|
+
"name": "scope",
|
|
62
|
+
"flag": "--scope",
|
|
63
|
+
"label": "Brain scope",
|
|
64
|
+
"type": "choice",
|
|
65
|
+
"options": [
|
|
66
|
+
"auto",
|
|
67
|
+
"project",
|
|
68
|
+
"global"
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
]
|
|
30
72
|
},
|
|
31
73
|
{
|
|
32
|
-
"name": "validate",
|
|
33
|
-
"
|
|
74
|
+
"name": "validate",
|
|
75
|
+
"description": "Validate a document against the effective SSSS registry",
|
|
76
|
+
"effect": "read",
|
|
77
|
+
"output": "json",
|
|
34
78
|
"args": [
|
|
35
|
-
{
|
|
36
|
-
|
|
79
|
+
{
|
|
80
|
+
"name": "file",
|
|
81
|
+
"flag": "--file",
|
|
82
|
+
"label": "Document path",
|
|
83
|
+
"type": "string",
|
|
84
|
+
"required": true
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"name": "extension",
|
|
88
|
+
"flag": "--extension",
|
|
89
|
+
"label": "Extension registry path",
|
|
90
|
+
"type": "string"
|
|
91
|
+
}
|
|
37
92
|
]
|
|
38
93
|
},
|
|
39
94
|
{
|
|
40
|
-
"name": "registry",
|
|
41
|
-
"
|
|
95
|
+
"name": "registry",
|
|
96
|
+
"description": "Verify the effective registry against a lock file",
|
|
97
|
+
"effect": "read",
|
|
98
|
+
"output": "json",
|
|
42
99
|
"args": [
|
|
43
|
-
{
|
|
44
|
-
|
|
100
|
+
{
|
|
101
|
+
"name": "lock",
|
|
102
|
+
"flag": "--lock",
|
|
103
|
+
"label": "Registry lock path",
|
|
104
|
+
"type": "string",
|
|
105
|
+
"required": true
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
"name": "extension",
|
|
109
|
+
"flag": "--extension",
|
|
110
|
+
"label": "Extension registry path",
|
|
111
|
+
"type": "string"
|
|
112
|
+
}
|
|
45
113
|
]
|
|
46
114
|
},
|
|
47
115
|
{
|
|
48
|
-
"name": "scaffold",
|
|
49
|
-
"
|
|
116
|
+
"name": "scaffold",
|
|
117
|
+
"description": "Create a complete canonical SSSS project",
|
|
118
|
+
"effect": "write",
|
|
119
|
+
"output": "json",
|
|
50
120
|
"args": [
|
|
51
|
-
{
|
|
52
|
-
|
|
53
|
-
|
|
121
|
+
{
|
|
122
|
+
"name": "directory",
|
|
123
|
+
"flag": "--directory",
|
|
124
|
+
"label": "New project directory",
|
|
125
|
+
"type": "string",
|
|
126
|
+
"required": true
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
"name": "extension",
|
|
130
|
+
"flag": "--extension",
|
|
131
|
+
"label": "Extension registry name",
|
|
132
|
+
"type": "string"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"name": "withTotalRecall",
|
|
136
|
+
"flag": "--with-total-recall",
|
|
137
|
+
"label": "Include Total Recall wiring",
|
|
138
|
+
"type": "boolean"
|
|
139
|
+
}
|
|
54
140
|
]
|
|
55
141
|
},
|
|
56
142
|
{
|
|
57
|
-
"name": "conformance",
|
|
58
|
-
"
|
|
143
|
+
"name": "conformance",
|
|
144
|
+
"description": "Run the canonical reference engine conformance suite",
|
|
145
|
+
"effect": "read",
|
|
146
|
+
"output": "json"
|
|
59
147
|
}
|
|
60
148
|
]
|
|
61
149
|
},
|
|
62
|
-
"status": {
|
|
63
|
-
|
|
64
|
-
"
|
|
65
|
-
|
|
66
|
-
|
|
150
|
+
"status": {
|
|
151
|
+
"command": "status",
|
|
152
|
+
"refresh_seconds": 60
|
|
153
|
+
},
|
|
154
|
+
"runtime": {
|
|
155
|
+
"modules": {
|
|
156
|
+
"installation": "runtime/installation.cjs",
|
|
157
|
+
"project-scaffold": "runtime/project-scaffold.mjs"
|
|
158
|
+
}
|
|
159
|
+
},
|
|
67
160
|
"capability": {
|
|
68
161
|
"entry": "capability/index.mjs",
|
|
69
|
-
"exports": [
|
|
162
|
+
"exports": [
|
|
163
|
+
"canonicalToolchain",
|
|
164
|
+
"scaffoldProject",
|
|
165
|
+
"validateDocument",
|
|
166
|
+
"verifyRegistry",
|
|
167
|
+
"runConformance"
|
|
168
|
+
]
|
|
70
169
|
},
|
|
71
170
|
"branding": {
|
|
72
|
-
"name": "SSSS",
|
|
73
|
-
"
|
|
171
|
+
"name": "SSSS",
|
|
172
|
+
"color": "#b98439",
|
|
173
|
+
"accent": "#f4c97a",
|
|
174
|
+
"font": "ibm-plex",
|
|
175
|
+
"density": "compact",
|
|
176
|
+
"radius": "sm",
|
|
177
|
+
"header": "ledger-rule",
|
|
178
|
+
"logo": "ui/logo.svg"
|
|
179
|
+
},
|
|
180
|
+
"auth": {
|
|
181
|
+
"plugin": "auth",
|
|
182
|
+
"methods": [
|
|
183
|
+
"passkey",
|
|
184
|
+
"google-oauth2"
|
|
185
|
+
],
|
|
186
|
+
"session_verification": true
|
|
74
187
|
},
|
|
75
|
-
"auth": { "plugin": "auth", "methods": ["passkey", "google-oauth2"], "session_verification": true },
|
|
76
188
|
"ui": {
|
|
77
189
|
"design_tokens": "DESIGN.md",
|
|
78
190
|
"home": "home",
|
|
79
191
|
"elements": [
|
|
80
|
-
{
|
|
192
|
+
{
|
|
193
|
+
"id": "home",
|
|
194
|
+
"kind": "panel",
|
|
195
|
+
"tag": "tr-ssss-home",
|
|
196
|
+
"module": "ui/home.js",
|
|
197
|
+
"description": "SSSS installation ledger with document, registry, scaffold and conformance checks"
|
|
198
|
+
}
|
|
81
199
|
]
|
|
82
|
-
}
|
|
200
|
+
},
|
|
201
|
+
"reuse": {
|
|
202
|
+
"commands": [
|
|
203
|
+
"total-recall auth session",
|
|
204
|
+
"total-recall decision status"
|
|
205
|
+
],
|
|
206
|
+
"owned": "SSSS canonical toolchain, schema/document validation, registry verification, project scaffolding, and conformance checks."
|
|
207
|
+
},
|
|
208
|
+
"skills": [
|
|
209
|
+
{
|
|
210
|
+
"id": "ssss",
|
|
211
|
+
"path": "./skills/ssss/SKILL.md",
|
|
212
|
+
"description": "Canonical SSSS distribution, scaffolding and validation for Total Recall installations."
|
|
213
|
+
}
|
|
214
|
+
]
|
|
83
215
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: ssss
|
|
3
|
+
description: "Canonical SSSS distribution, scaffolding and validation for Total Recall installations."
|
|
4
|
+
version: 0.2.0
|
|
5
|
+
repo_scoped: false
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# SSSS
|
|
9
|
+
|
|
10
|
+
Canonical SSSS distribution, scaffolding and validation for Total Recall installations.
|
|
11
|
+
|
|
12
|
+
## When to Use
|
|
13
|
+
|
|
14
|
+
Use the `ssss` Total Recall plugin (`total-recall ssss`) instead of ad-hoc scripts or raw commands whenever working on ssss tasks.
|
|
15
|
+
|
|
16
|
+
## Commands
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
total-recall ssss --help
|
|
20
|
+
total-recall ssss status # Inspect the installed engine, skill and full scaffold
|
|
21
|
+
total-recall ssss repair # Restore missing or previously repinned managed SSSS installation files
|
|
22
|
+
total-recall ssss validate # Validate a document against the effective SSSS registry
|
|
23
|
+
total-recall ssss registry # Verify the effective registry against a lock file
|
|
24
|
+
total-recall ssss scaffold # Create a complete canonical SSSS project
|
|
25
|
+
total-recall ssss conformance # Run the canonical reference engine conformance suite
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Owned Raw Commands
|
|
29
|
+
|
|
30
|
+
This plugin owns: `npx\s+(--yes\s+)?@gregiteen/ssss-cli\s+new\b`.
|
|
@@ -274,7 +274,7 @@ export async function createPlugin(args = []) {
|
|
|
274
274
|
};
|
|
275
275
|
}
|
|
276
276
|
|
|
277
|
-
const withSkill = args.includes("--
|
|
277
|
+
const withSkill = !args.includes("--no-skill");
|
|
278
278
|
const isCapability = args.includes("--capability") || Boolean(fromSkillPath);
|
|
279
279
|
|
|
280
280
|
if (withCli || isCapability || withTask) {
|
|
@@ -386,6 +386,7 @@ export default run;
|
|
|
386
386
|
name: ${id}
|
|
387
387
|
description: "${pluginDesc}"
|
|
388
388
|
version: 0.1.0
|
|
389
|
+
repo_scoped: false
|
|
389
390
|
---
|
|
390
391
|
|
|
391
392
|
# ${pluginName}
|
|
@@ -59,43 +59,50 @@ export async function managePluginLicense(args = []) {
|
|
|
59
59
|
const TR = process.env.TOTAL_RECALL_BIN || 'total-recall';
|
|
60
60
|
const amount = mon.price_cents || 1000;
|
|
61
61
|
const currency = (mon.currency || 'USD').toLowerCase();
|
|
62
|
-
const
|
|
63
|
-
const
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
62
|
+
const baseUrl = (process.env.TR_STORE_BASE_URL || 'http://127.0.0.1:3000').replace(/\/+$/, '');
|
|
63
|
+
const sIdx = args.indexOf('--success-url');
|
|
64
|
+
const cIdx = args.indexOf('--cancel-url');
|
|
65
|
+
const successUrl = (sIdx !== -1 && args[sIdx + 1]) || `${baseUrl}/plugins/success?plugin=${encodeURIComponent(pluginId)}`;
|
|
66
|
+
const cancelUrl = (cIdx !== -1 && args[cIdx + 1]) || `${baseUrl}/plugins/cancel?plugin=${encodeURIComponent(pluginId)}`;
|
|
67
|
+
const stripeArgs = [
|
|
68
|
+
'stripe', 'checkout',
|
|
69
|
+
'--amount', String(amount),
|
|
70
|
+
'--currency', currency,
|
|
71
|
+
'--name', `${plugin.manifest.name} License`,
|
|
72
|
+
'--success-url', successUrl,
|
|
73
|
+
'--cancel-url', cancelUrl,
|
|
74
|
+
'--json'
|
|
75
|
+
];
|
|
76
|
+
if (mon.recipient?.account_id) stripeArgs.push('--account', mon.recipient.account_id);
|
|
77
|
+
const script = TR.endsWith('.mjs');
|
|
78
|
+
const stripeRes = spawnSync(script ? process.execPath : TR, [
|
|
79
|
+
...(script ? [TR] : []),
|
|
80
|
+
...stripeArgs
|
|
81
|
+
], { encoding: 'utf8', timeout: 15000 });
|
|
82
|
+
if (stripeRes.status === 0 && stripeRes.stdout) {
|
|
83
|
+
let parsed = {};
|
|
84
|
+
try { parsed = JSON.parse(stripeRes.stdout); } catch {}
|
|
85
|
+
const url = parsed.url || parsed.checkout_url || parsed.data?.url;
|
|
86
|
+
if (url) {
|
|
87
|
+
if (json) {
|
|
88
|
+
console.log(JSON.stringify({ plugin: pluginId, checkout_url: url, session_id: parsed.id || parsed.session_id || null, amount, currency }));
|
|
89
|
+
} else {
|
|
90
|
+
console.log(`\nš³ Stripe Checkout Session Created:`);
|
|
91
|
+
console.log(` Plugin: ${plugin.manifest.name}`);
|
|
92
|
+
console.log(` Amount: $${(amount / 100).toFixed(2)} ${currency.toUpperCase()}`);
|
|
93
|
+
console.log(` Checkout URL: ${url}\n`);
|
|
89
94
|
}
|
|
95
|
+
return;
|
|
90
96
|
}
|
|
91
|
-
}
|
|
97
|
+
}
|
|
98
|
+
const errDetail = (stripeRes.stderr || stripeRes.stdout || stripeRes.error?.message || 'Stripe checkout failed').trim();
|
|
92
99
|
if (json) {
|
|
93
|
-
console.log(JSON.stringify({ plugin: pluginId, price_formatted: mon.priceFormatted, requires_purchase: true }));
|
|
100
|
+
console.log(JSON.stringify({ ok: false, plugin: pluginId, error: errDetail, price_formatted: mon.priceFormatted, requires_purchase: true }));
|
|
94
101
|
} else {
|
|
95
|
-
console.
|
|
96
|
-
console.
|
|
97
|
-
console.log(` Activate license after purchase: total-recall plugin license ${pluginId} activate --stdin\n`);
|
|
102
|
+
console.error(`ā Stripe checkout failed for '${pluginId}': ${errDetail}`);
|
|
103
|
+
console.error(` Activate an existing license with: total-recall plugin license ${pluginId} activate --stdin`);
|
|
98
104
|
}
|
|
105
|
+
process.exitCode = 1;
|
|
99
106
|
return;
|
|
100
107
|
}
|
|
101
108
|
|
|
@@ -105,6 +112,33 @@ export async function managePluginLicense(args = []) {
|
|
|
105
112
|
else console.log(`ā¹ļø Plugin '${pluginId}' does not require a commercial license (${mon.model}).`);
|
|
106
113
|
return;
|
|
107
114
|
}
|
|
115
|
+
const sessIdx = args.indexOf('--session-id');
|
|
116
|
+
const sessionId = sessIdx !== -1 ? args[sessIdx + 1] : null;
|
|
117
|
+
if (sessionId) {
|
|
118
|
+
const TR = process.env.TOTAL_RECALL_BIN || 'total-recall';
|
|
119
|
+
const script = TR.endsWith('.mjs');
|
|
120
|
+
const vRes = spawnSync(script ? process.execPath : TR, [
|
|
121
|
+
...(script ? [TR] : []),
|
|
122
|
+
'stripe', 'verify-entitlement',
|
|
123
|
+
'--session-id', sessionId,
|
|
124
|
+
'--consumer', pluginId,
|
|
125
|
+
'--amount', String(mon.price_cents || 1000),
|
|
126
|
+
'--currency', (mon.currency || 'USD').toLowerCase(),
|
|
127
|
+
'--json'
|
|
128
|
+
], { encoding: 'utf8', timeout: 15000 });
|
|
129
|
+
let vParsed = null;
|
|
130
|
+
try { vParsed = vRes.stdout ? JSON.parse(vRes.stdout) : null; } catch {}
|
|
131
|
+
if (vRes.status !== 0 || !vParsed?.entitled) {
|
|
132
|
+
const msg = vParsed?.error || (vRes.stderr || vRes.stdout || 'Stripe entitlement verification failed').trim();
|
|
133
|
+
if (json) console.log(JSON.stringify({ verified: false, plugin: pluginId, session_id: sessionId, error: msg }));
|
|
134
|
+
else console.error(`ā Stripe entitlement check failed for '${pluginId}': ${msg}`);
|
|
135
|
+
process.exitCode = 1;
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
if (json) console.log(JSON.stringify({ verified: true, plugin: pluginId, session_id: sessionId, status: 'active', entitlement: vParsed }));
|
|
139
|
+
else console.log(`ā
Stripe entitlement verified active for '${pluginId}' (session ${sessionId}).`);
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
108
142
|
const secretKey = mon.license_key_secret;
|
|
109
143
|
const currentKey = secretKey ? await getSecret(defaultBrainDir(), secretKey, { actor: 'plugin-license' }) : null;
|
|
110
144
|
if (!currentKey?.found || !currentKey?.value) {
|
|
@@ -2,17 +2,18 @@ import { listAvailableBundled } from '../../core/plugin-store.mjs';
|
|
|
2
2
|
|
|
3
3
|
function parseArgs(args) {
|
|
4
4
|
const isJson = args.includes('--json');
|
|
5
|
+
const isStore = args.includes('--store');
|
|
5
6
|
let useCase = null;
|
|
6
7
|
const words = [];
|
|
7
8
|
for (let i = 0; i < args.length; i++) {
|
|
8
|
-
if (args[i] === '--json') continue;
|
|
9
|
+
if (args[i] === '--json' || args[i] === '--store') continue;
|
|
9
10
|
if (args[i] === '--use-case' && args[i + 1]) {
|
|
10
11
|
useCase = args[++i];
|
|
11
12
|
continue;
|
|
12
13
|
}
|
|
13
14
|
words.push(args[i]);
|
|
14
15
|
}
|
|
15
|
-
return { isJson, useCase, query: words.join(' ').toLowerCase().trim() };
|
|
16
|
+
return { isJson, isStore, useCase, query: words.join(' ').toLowerCase().trim() };
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
/**
|
|
@@ -108,7 +109,28 @@ export async function listPeers(args = []) {
|
|
|
108
109
|
|
|
109
110
|
/** `plugin search <query>` ā bundled plugins plus whatever mesh peers share. */
|
|
110
111
|
export async function searchPlugins(args = []) {
|
|
111
|
-
const { isJson, useCase, query } = parseArgs(args);
|
|
112
|
+
const { isJson, isStore, useCase, query } = parseArgs(args);
|
|
113
|
+
if (isStore) {
|
|
114
|
+
const base = (process.env.TR_STORE_URL || 'http://127.0.0.1:3000').replace(/\/+$/, '');
|
|
115
|
+
const params = new URLSearchParams();
|
|
116
|
+
if (query) params.set('q', query);
|
|
117
|
+
if (useCase) params.set('use_case', useCase);
|
|
118
|
+
const res = await fetch(`${base}/api/store/plugins${params.toString() ? `?${params}` : ''}`);
|
|
119
|
+
if (!res.ok) throw new Error(`Store catalog unavailable (HTTP ${res.status})`);
|
|
120
|
+
const data = await res.json();
|
|
121
|
+
const storePlugins = data.plugins || [];
|
|
122
|
+
if (isJson) {
|
|
123
|
+
console.log(JSON.stringify({ store: storePlugins }, null, 2));
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
console.log(`\nš Store plugins matching "${query || '*'}"${useCase ? ` (use case: ${useCase})` : ''}\n`);
|
|
127
|
+
if (storePlugins.length === 0) {
|
|
128
|
+
console.log('No store plugins found.\n');
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
for (const p of storePlugins) printPlugin(p, `store:${p.id}`);
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
112
134
|
const bundled = listAvailableBundled(process.cwd()).filter((p) => matches(p, query, useCase));
|
|
113
135
|
const { listPeerPlugins } = await import('../../core/plugin-peers.mjs');
|
|
114
136
|
const peers = await listPeerPlugins();
|