@gyoungwe/research-suite 0.1.5 → 0.1.7
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/build-manifest.json +2 -2
- package/node_modules/@gyoungwe/pi-core/build-manifest.json +2 -2
- package/node_modules/@gyoungwe/pi-core/dist/index.mjs +391 -10
- package/node_modules/@gyoungwe/pi-core/package.json +1 -1
- package/node_modules/@gyoungwe/pi-knowledge/build-manifest.json +68 -3
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/capability-discovery.d.ts +7 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/capability-discovery.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/claim-conflicts.d.ts +30 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/claim-conflicts.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/config.d.ts +55 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/config.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/daily-discovery-prompt.d.ts +11 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/daily-discovery-prompt.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/daily-discovery.d.ts +26 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/daily-discovery.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/deliverable-review.d.ts +127 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/deliverable-review.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/evolution.d.ts +39 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/evolution.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/experience-store.d.ts +290 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/experience-store.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/extension-helpers.d.ts +38 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/extension-helpers.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/files.d.ts +39 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/files.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/flow-cards.d.ts +77 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/flow-cards.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/graph-cache.d.ts +14 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/graph-cache.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/graph-retrieval.d.ts +44 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/graph-retrieval.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/host.d.ts +9 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/host.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/index.d.ts +46 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/index.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/ingest-frontmatter.d.ts +125 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/ingest-frontmatter.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/ingest-identity.d.ts +93 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/ingest-identity.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/ingest-policy.d.ts +63 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/ingest-policy.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/layout.d.ts +47 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/layout.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/maintenance.d.ts +16 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/maintenance.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/memory-note.d.ts +14 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/memory-note.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/metacognitive-policy.d.ts +116 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/metacognitive-policy.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/note-title.d.ts +8 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/note-title.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/orchestration-policy.d.ts +84 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/orchestration-policy.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/project-identity.d.ts +70 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/project-identity.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/publication-policy.d.ts +39 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/publication-policy.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/publication.d.ts +24 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/publication.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/recent-by-category.d.ts +15 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/recent-by-category.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/related-notes.d.ts +4 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/related-notes.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/reuse.d.ts +124 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/reuse.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/review-policy.d.ts +12 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/review-policy.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/runtime-host.d.ts +98 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/runtime-host.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/search-policy.d.ts +14 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/search-policy.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/semantic-model.d.ts +85 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/semantic-model.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/semantic-provider.d.ts +41 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/semantic-provider.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/semantic-settings.d.ts +30 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/semantic-settings.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/service.d.ts +171 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/service.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/source-links.d.ts +13 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/source-links.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/specialist-delivery.d.ts +8 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/specialist-delivery.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/specialist-host.d.ts +61 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/specialist-host.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/specialists.d.ts +55 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/specialists.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/task-feedback.d.ts +57 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/task-feedback.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/tool-budget.d.ts +24 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/tool-budget.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/topic-candidate.d.ts +22 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/topic-candidate.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/topic-memory.d.ts +79 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/topic-memory.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/topic-probe.d.ts +2 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/topic-probe.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/ui-service.d.ts +360 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/ui-service.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/ui-state.d.ts +28 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/ui-state.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/wiki-model-review.d.ts +167 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/wiki-model-review.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/wiki-policy.d.ts +34 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/wiki-policy.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/wiki-review.d.ts +74 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/wiki-review.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/worker.d.ts +2 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/core/worker.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/extension/internal-knowledge-extension.d.ts +42 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/extension/internal-knowledge-extension.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/extension/knowledge-extension.d.ts +5 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/extension/knowledge-extension.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/extension/knowledge-worker.d.ts +6 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/extension/knowledge-worker.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/host.d.ts +7 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/host.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/host.mjs +11638 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/index.d.ts +6 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/index.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/index.mjs +4728 -10301
- package/node_modules/@gyoungwe/pi-knowledge/dist/maintenance/plan.d.ts +41 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/maintenance/plan.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/maintenance/prompts.d.ts +10 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/maintenance/prompts.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/maintenance/run.d.ts +31 -0
- package/node_modules/@gyoungwe/pi-knowledge/dist/maintenance/run.d.ts.map +1 -0
- package/node_modules/@gyoungwe/pi-knowledge/lib/knowledge/runtime/.knowledge-worker-manifest.json +9 -0
- package/node_modules/@gyoungwe/pi-knowledge/lib/knowledge/runtime/worker.mjs +142 -12
- package/node_modules/@gyoungwe/pi-knowledge/package.json +21 -3
- package/node_modules/@gyoungwe/pi-knowledge/plugin.manifest.json +23 -1
- package/node_modules/@gyoungwe/pi-research/build-manifest.json +2 -2
- package/node_modules/@gyoungwe/pi-research/dist/index.mjs +3141 -613
- package/node_modules/@gyoungwe/pi-research/package.json +1 -1
- package/node_modules/@gyoungwe/plugin-api/dist/index.d.ts +101 -0
- package/node_modules/@gyoungwe/plugin-api/dist/index.d.ts.map +1 -1
- package/node_modules/@gyoungwe/plugin-api/dist/index.js +124 -0
- package/node_modules/@gyoungwe/plugin-api/dist/index.js.map +1 -1
- package/node_modules/@gyoungwe/plugin-api/dist/knowledge.d.ts +486 -0
- package/node_modules/@gyoungwe/plugin-api/dist/knowledge.d.ts.map +1 -0
- package/node_modules/@gyoungwe/plugin-api/dist/knowledge.js +251 -0
- package/node_modules/@gyoungwe/plugin-api/dist/knowledge.js.map +1 -0
- package/node_modules/@gyoungwe/plugin-api/package.json +6 -1
- package/package.json +6 -6
- package/plugin.manifest.json +39 -3
package/build-manifest.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 1,
|
|
3
3
|
"generator": "packages/research-suite/scripts/build.mjs",
|
|
4
|
-
"packageVersion": "0.1.
|
|
4
|
+
"packageVersion": "0.1.7",
|
|
5
5
|
"bundled": [
|
|
6
6
|
"@gyoungwe/pi-core",
|
|
7
7
|
"@gyoungwe/pi-knowledge",
|
|
8
8
|
"@gyoungwe/pi-research"
|
|
9
9
|
],
|
|
10
|
-
"dependenciesSha256": "
|
|
10
|
+
"dependenciesSha256": "97dd221032721bdfabd9c582ad0cf6255e8954d7ed4306e0f557ce0051cd7d5e"
|
|
11
11
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 1,
|
|
3
3
|
"generator": "scripts/build-pi-core.mjs",
|
|
4
|
-
"inputsSha256": "
|
|
4
|
+
"inputsSha256": "a912656013c014410f9ef484f717ce4d4c71a9301b619df43ab5eec93441a4c1",
|
|
5
5
|
"outputs": {
|
|
6
|
-
"dist/index.mjs": "
|
|
6
|
+
"dist/index.mjs": "5ac615aa70faa7996b8f6d8519afcb6662f7f65786042993e317ef83ff571f7b"
|
|
7
7
|
}
|
|
8
8
|
}
|
|
@@ -20,6 +20,8 @@ import { AsyncLocalStorage } from "node:async_hooks";
|
|
|
20
20
|
var contexts = new AsyncLocalStorage();
|
|
21
21
|
var installedRuntime = null;
|
|
22
22
|
var standaloneRuntime = null;
|
|
23
|
+
var runtimeBindings = /* @__PURE__ */ new WeakSet();
|
|
24
|
+
var hostRuntimes = /* @__PURE__ */ new WeakMap();
|
|
23
25
|
var KeyedScheduler = class {
|
|
24
26
|
#tails = /* @__PURE__ */ new Map();
|
|
25
27
|
#disposed = false;
|
|
@@ -100,6 +102,99 @@ function createStandaloneRuntime(log = {}) {
|
|
|
100
102
|
};
|
|
101
103
|
return runtime;
|
|
102
104
|
}
|
|
105
|
+
function bindRuntime(pi) {
|
|
106
|
+
if (!pi || typeof pi !== "object" && typeof pi !== "function") return () => {
|
|
107
|
+
};
|
|
108
|
+
if (runtimeBindings.has(pi)) return () => {
|
|
109
|
+
};
|
|
110
|
+
runtimeBindings.add(pi);
|
|
111
|
+
const inherited = currentRuntime();
|
|
112
|
+
const fallback = createStandaloneRuntime();
|
|
113
|
+
adoptRuntimeState(inherited, fallback);
|
|
114
|
+
hostRuntimes.set(pi, fallback);
|
|
115
|
+
if (!pi.events?.on || !pi.events?.emit) {
|
|
116
|
+
return () => {
|
|
117
|
+
if (hostRuntimes.get(pi) !== fallback) return;
|
|
118
|
+
runtimeBindings.delete(pi);
|
|
119
|
+
hostRuntimes.delete(pi);
|
|
120
|
+
void fallback.dispose();
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
const receive = (payload) => {
|
|
124
|
+
if (!payload || typeof payload !== "object") return;
|
|
125
|
+
const event = payload;
|
|
126
|
+
if (event.version !== RUNTIME_BRIDGE_VERSION) return;
|
|
127
|
+
const runtime = event.runtime;
|
|
128
|
+
if (!runtime || typeof runtime !== "object" || !runtime.scheduler) return;
|
|
129
|
+
const previous = hostRuntimes.get(pi);
|
|
130
|
+
if (previous && previous !== runtime) adoptRuntimeState(previous, runtime);
|
|
131
|
+
hostRuntimes.set(pi, runtime);
|
|
132
|
+
if (previous && previous !== runtime) void previous.dispose();
|
|
133
|
+
};
|
|
134
|
+
pi.events.on("drone:runtime/v1", receive);
|
|
135
|
+
void pi.events.emit?.("drone:runtime/request/v1", { version: RUNTIME_BRIDGE_VERSION });
|
|
136
|
+
return () => {
|
|
137
|
+
runtimeBindings.delete(pi);
|
|
138
|
+
if (hostRuntimes.get(pi) === fallback) {
|
|
139
|
+
hostRuntimes.delete(pi);
|
|
140
|
+
void fallback.dispose();
|
|
141
|
+
} else hostRuntimes.delete(pi);
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
function adoptRuntimeState(previous, runtime) {
|
|
145
|
+
const sourceTools = previous?.tools?.manifest;
|
|
146
|
+
if (sourceTools) {
|
|
147
|
+
if (!runtime.tools) runtime.tools = {};
|
|
148
|
+
const targetTools = runtime.tools.manifest ?? { tools: /* @__PURE__ */ new Map(), families: /* @__PURE__ */ new Map() };
|
|
149
|
+
runtime.tools.manifest = targetTools;
|
|
150
|
+
if (!targetTools.tools) targetTools.tools = /* @__PURE__ */ new Map();
|
|
151
|
+
for (const [name, meta] of sourceTools.tools || []) {
|
|
152
|
+
if (!targetTools.tools.has(name)) targetTools.tools.set(name, meta);
|
|
153
|
+
}
|
|
154
|
+
if (!targetTools.families) targetTools.families = /* @__PURE__ */ new Map();
|
|
155
|
+
for (const [name, meta] of sourceTools.families || []) {
|
|
156
|
+
if (!targetTools.families.has(name)) targetTools.families.set(name, meta);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
const sourceAcceptance = previous?.tasks?.acceptance;
|
|
160
|
+
if (sourceAcceptance) {
|
|
161
|
+
if (!runtime.tasks) runtime.tasks = {};
|
|
162
|
+
const targetAcceptance = runtime.tasks.acceptance ?? {
|
|
163
|
+
verifiers: /* @__PURE__ */ new Map(),
|
|
164
|
+
kinds: [],
|
|
165
|
+
properties: {}
|
|
166
|
+
};
|
|
167
|
+
runtime.tasks.acceptance = targetAcceptance;
|
|
168
|
+
if (!targetAcceptance.verifiers) targetAcceptance.verifiers = /* @__PURE__ */ new Map();
|
|
169
|
+
for (const [kind, verifier] of sourceAcceptance.verifiers || []) {
|
|
170
|
+
if (!targetAcceptance.verifiers.has(kind)) targetAcceptance.verifiers.set(kind, verifier);
|
|
171
|
+
}
|
|
172
|
+
if (Array.isArray(sourceAcceptance.kinds)) {
|
|
173
|
+
targetAcceptance.kinds ??= [];
|
|
174
|
+
for (const kind of sourceAcceptance.kinds)
|
|
175
|
+
if (!targetAcceptance.kinds.includes(kind)) targetAcceptance.kinds.push(kind);
|
|
176
|
+
}
|
|
177
|
+
targetAcceptance.properties ??= {};
|
|
178
|
+
for (const [key, value] of Object.entries(sourceAcceptance.properties || {}))
|
|
179
|
+
if (!(key in targetAcceptance.properties)) targetAcceptance.properties[key] = value;
|
|
180
|
+
}
|
|
181
|
+
for (const domain of ["knowledge", "tasks", "tools"]) {
|
|
182
|
+
const source = previous?.[domain];
|
|
183
|
+
if (!source || typeof source !== "object") continue;
|
|
184
|
+
let target = runtime[domain];
|
|
185
|
+
if (!target) {
|
|
186
|
+
target = {};
|
|
187
|
+
runtime[domain] = target;
|
|
188
|
+
}
|
|
189
|
+
for (const key of Reflect.ownKeys(source)) {
|
|
190
|
+
if (domain === "tasks" && key === "workbench") continue;
|
|
191
|
+
if (!(key in target)) target[key] = source[key];
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
function runtimeForHost(pi) {
|
|
196
|
+
return hostRuntimes.get(pi) ?? currentRuntime();
|
|
197
|
+
}
|
|
103
198
|
function currentRuntime() {
|
|
104
199
|
const scoped = contexts.getStore();
|
|
105
200
|
if (scoped) return scoped;
|
|
@@ -147,6 +242,7 @@ function runtimeSlot(domain, slot, create) {
|
|
|
147
242
|
);
|
|
148
243
|
return proxy;
|
|
149
244
|
}
|
|
245
|
+
var RUNTIME_BRIDGE_VERSION = 1;
|
|
150
246
|
|
|
151
247
|
// ../tasks/src/runtime-compiled/acceptance.mjs
|
|
152
248
|
var CORE_ACCEPTANCE_KINDS = Object.freeze(["file", "human_review"]);
|
|
@@ -1970,7 +2066,7 @@ function shouldAskToContinue(task2) {
|
|
|
1970
2066
|
|
|
1971
2067
|
// ../tasks/src/runtime-compiled/register.mjs
|
|
1972
2068
|
function registerWorkbench(pi, options = {}) {
|
|
1973
|
-
let context, activeSessionId, prepared = false, awaitingUser = false, halted = false;
|
|
2069
|
+
let context, activeSessionId, prepared = false, awaitingUser = false, halted = false, readKnowledgeBinding = options.readKnowledgeBinding || (() => pi?.drone?.readKnowledgeBinding?.() || null);
|
|
1974
2070
|
let pendingStatus = null;
|
|
1975
2071
|
let providerTurnOpen = false;
|
|
1976
2072
|
const authorize = async (cwd, path) => {
|
|
@@ -2045,7 +2141,9 @@ function registerWorkbench(pi, options = {}) {
|
|
|
2045
2141
|
journal.attach(scope, ctx.sessionManager?.getBranch?.() || [], force);
|
|
2046
2142
|
evidence.attach(scope, journal.snapshot()?.id, ctx.sessionManager?.getBranch?.() || [], force);
|
|
2047
2143
|
};
|
|
2048
|
-
|
|
2144
|
+
journal.configure = (nextOptions = {}) => {
|
|
2145
|
+
if (nextOptions.readKnowledgeBinding) readKnowledgeBinding = nextOptions.readKnowledgeBinding;
|
|
2146
|
+
};
|
|
2049
2147
|
const bindingKey = async () => {
|
|
2050
2148
|
const b = await readKnowledgeBinding();
|
|
2051
2149
|
return b ? `${b.vaultId}:${b.revision}` : null;
|
|
@@ -2745,7 +2843,73 @@ function createTaskJournal({ persist = () => {
|
|
|
2745
2843
|
};
|
|
2746
2844
|
}
|
|
2747
2845
|
function registerTaskRuntime(pi, options = {}) {
|
|
2748
|
-
|
|
2846
|
+
bindRuntime(pi);
|
|
2847
|
+
const hostRuntime = runtimeForHost(pi);
|
|
2848
|
+
hostRuntime.tasks ??= {};
|
|
2849
|
+
if (hostRuntime.tasks.workbench?.journal) {
|
|
2850
|
+
hostRuntime.tasks.workbench.journal.configure?.(options);
|
|
2851
|
+
return hostRuntime.tasks.workbench.journal;
|
|
2852
|
+
}
|
|
2853
|
+
const shared = requestSharedTaskRuntime(pi);
|
|
2854
|
+
if (shared?.journal) {
|
|
2855
|
+
shared.journal.configure?.(options);
|
|
2856
|
+
hostRuntime.tasks.workbench = shared;
|
|
2857
|
+
return shared.journal;
|
|
2858
|
+
}
|
|
2859
|
+
const registry3 = taskRuntimeRegistry(pi);
|
|
2860
|
+
if (registry3?.journal) {
|
|
2861
|
+
registry3.journal.configure?.(options);
|
|
2862
|
+
return registry3.journal;
|
|
2863
|
+
}
|
|
2864
|
+
const journal = process.env.DRONE_TASK_WORKBENCH !== "off" ? registerWorkbench(pi, options) : createLegacyTaskJournal(pi);
|
|
2865
|
+
if (registry3) registry3.journal = journal;
|
|
2866
|
+
hostRuntime.tasks.workbench = { version: 1, journal };
|
|
2867
|
+
publishTaskRuntimeRegistry(pi, registry3);
|
|
2868
|
+
return journal;
|
|
2869
|
+
}
|
|
2870
|
+
var TASK_RUNTIME_REGISTRY = "__drone_task_runtime_v1";
|
|
2871
|
+
var TASK_RUNTIME_REQUEST = "drone:task-runtime/request/v1";
|
|
2872
|
+
var TASK_RUNTIME_RESPONSE = "drone:task-runtime/v1";
|
|
2873
|
+
var localTaskRuntimeRegistry = /* @__PURE__ */ new WeakMap();
|
|
2874
|
+
function requestSharedTaskRuntime(pi) {
|
|
2875
|
+
const events = pi?.events;
|
|
2876
|
+
if (!events?.on || !events.emit) return null;
|
|
2877
|
+
let shared = null;
|
|
2878
|
+
const unsubscribe = events.on(TASK_RUNTIME_RESPONSE, (payload) => {
|
|
2879
|
+
if (payload?.version === 1 && payload.registry?.journal) shared = payload.registry;
|
|
2880
|
+
});
|
|
2881
|
+
events.emit(TASK_RUNTIME_REQUEST, { version: 1 });
|
|
2882
|
+
unsubscribe?.();
|
|
2883
|
+
return shared;
|
|
2884
|
+
}
|
|
2885
|
+
function publishTaskRuntimeRegistry(pi, registry3) {
|
|
2886
|
+
const events = pi?.events;
|
|
2887
|
+
if (!events?.on || !events.emit) return;
|
|
2888
|
+
events.on(TASK_RUNTIME_REQUEST, (payload) => {
|
|
2889
|
+
if (payload?.version === 1) events.emit(TASK_RUNTIME_RESPONSE, { version: 1, registry: registry3 });
|
|
2890
|
+
});
|
|
2891
|
+
}
|
|
2892
|
+
function taskRuntimeRegistry(pi) {
|
|
2893
|
+
if (!pi || typeof pi !== "object" && typeof pi !== "function") return null;
|
|
2894
|
+
const owner = pi.events && (typeof pi.events === "object" || typeof pi.events === "function") ? pi.events : pi;
|
|
2895
|
+
const attached = owner[TASK_RUNTIME_REGISTRY];
|
|
2896
|
+
if (attached && attached.version === 1) return attached;
|
|
2897
|
+
const local = localTaskRuntimeRegistry.get(owner);
|
|
2898
|
+
if (local) return local;
|
|
2899
|
+
const registry3 = { version: 1, journal: null };
|
|
2900
|
+
if (Object.isExtensible(owner)) {
|
|
2901
|
+
Object.defineProperty(owner, TASK_RUNTIME_REGISTRY, {
|
|
2902
|
+
value: registry3,
|
|
2903
|
+
enumerable: false,
|
|
2904
|
+
configurable: false,
|
|
2905
|
+
writable: false
|
|
2906
|
+
});
|
|
2907
|
+
} else {
|
|
2908
|
+
localTaskRuntimeRegistry.set(owner, registry3);
|
|
2909
|
+
}
|
|
2910
|
+
return registry3;
|
|
2911
|
+
}
|
|
2912
|
+
function createLegacyTaskJournal(pi) {
|
|
2749
2913
|
const journal = createTaskJournal({ persist: (snapshot2) => pi.appendEntry?.(TASK_ENTRY, snapshot2) });
|
|
2750
2914
|
const attach = (ctx, force = false) => {
|
|
2751
2915
|
const id = ctx.sessionManager?.getSessionId?.() || ctx.sessionId || "isolated";
|
|
@@ -2819,9 +2983,10 @@ Use task_status for operational delivery. Verify unknown outcomes before repeati
|
|
|
2819
2983
|
// src/drone-commands.ts
|
|
2820
2984
|
import { readFileSync } from "node:fs";
|
|
2821
2985
|
import { createRequire } from "node:module";
|
|
2822
|
-
import { join } from "node:path";
|
|
2986
|
+
import { dirname, join } from "node:path";
|
|
2987
|
+
import { fileURLToPath } from "node:url";
|
|
2823
2988
|
var DRONE_COMMAND_SCHEMA_VERSION = 1;
|
|
2824
|
-
var PI_CORE_PACKAGE_VERSION = "0.1.
|
|
2989
|
+
var PI_CORE_PACKAGE_VERSION = "0.1.5";
|
|
2825
2990
|
var PI_HOST_RANGE = ">=1.1.0 <2.0.0";
|
|
2826
2991
|
var CORE_TOOLS = [
|
|
2827
2992
|
"ask_user",
|
|
@@ -2874,13 +3039,41 @@ var EXAMPLE_KINDS = new Set(Object.keys(EXAMPLE_PROFILES));
|
|
|
2874
3039
|
function packageVersion() {
|
|
2875
3040
|
const configured = process.env.PI_VERSION?.trim();
|
|
2876
3041
|
if (configured) return { version: configured, source: "PI_VERSION" };
|
|
3042
|
+
const readPackageFrom = (entry) => {
|
|
3043
|
+
let current = entry;
|
|
3044
|
+
try {
|
|
3045
|
+
current = dirname(current);
|
|
3046
|
+
} catch {
|
|
3047
|
+
return void 0;
|
|
3048
|
+
}
|
|
3049
|
+
for (let depth = 0; depth < 8; depth += 1) {
|
|
3050
|
+
const packagePath = join(current, "package.json");
|
|
3051
|
+
try {
|
|
3052
|
+
const metadata = JSON.parse(readFileSync(packagePath, "utf8"));
|
|
3053
|
+
if (metadata?.name === "@earendil-works/pi-coding-agent" && typeof metadata.version === "string" && metadata.version.length > 0)
|
|
3054
|
+
return { version: metadata.version, source: "resolved-package" };
|
|
3055
|
+
} catch {
|
|
3056
|
+
}
|
|
3057
|
+
const parent = dirname(current);
|
|
3058
|
+
if (parent === current) break;
|
|
3059
|
+
current = parent;
|
|
3060
|
+
}
|
|
3061
|
+
return void 0;
|
|
3062
|
+
};
|
|
3063
|
+
const candidates = [fileURLToPath(import.meta.url), process.argv[1], process.cwd()].filter(
|
|
3064
|
+
(entry) => typeof entry === "string" && entry.length > 0
|
|
3065
|
+
);
|
|
3066
|
+
for (const candidate of candidates) {
|
|
3067
|
+
const resolved = readPackageFrom(candidate);
|
|
3068
|
+
if (resolved) return resolved;
|
|
3069
|
+
}
|
|
2877
3070
|
try {
|
|
2878
3071
|
const require2 = createRequire(import.meta.url);
|
|
2879
3072
|
for (const base of require2.resolve.paths("@earendil-works/pi-coding-agent") ?? []) {
|
|
2880
3073
|
const packagePath = join(base, "@earendil-works/pi-coding-agent", "package.json");
|
|
2881
3074
|
try {
|
|
2882
3075
|
const metadata = JSON.parse(readFileSync(packagePath, "utf8"));
|
|
2883
|
-
if (typeof metadata.version === "string" && metadata.version.length > 0)
|
|
3076
|
+
if (metadata.name === "@earendil-works/pi-coding-agent" && typeof metadata.version === "string" && metadata.version.length > 0)
|
|
2884
3077
|
return { version: metadata.version, source: "resolved-package" };
|
|
2885
3078
|
} catch {
|
|
2886
3079
|
}
|
|
@@ -10905,6 +11098,18 @@ var ComputeHostInputSchema = typebox_exports.Object(
|
|
|
10905
11098
|
},
|
|
10906
11099
|
{ additionalProperties: false }
|
|
10907
11100
|
);
|
|
11101
|
+
var ComputeSshConfigHostSchema = typebox_exports.Object(
|
|
11102
|
+
{
|
|
11103
|
+
alias: typebox_exports.String({ minLength: 1, maxLength: 64, pattern: "^[A-Za-z0-9._-]+$" }),
|
|
11104
|
+
hostname: typebox_exports.Optional(typebox_exports.String({ maxLength: 512 })),
|
|
11105
|
+
port: typebox_exports.Optional(typebox_exports.Integer({ minimum: 1, maximum: 65535 })),
|
|
11106
|
+
user: typebox_exports.Optional(typebox_exports.String({ maxLength: 128 })),
|
|
11107
|
+
identityFiles: typebox_exports.Array(typebox_exports.String({ maxLength: 1024 }), { maxItems: 8 }),
|
|
11108
|
+
proxyJump: typebox_exports.Optional(typebox_exports.String({ maxLength: 512 })),
|
|
11109
|
+
source: typebox_exports.Literal("ssh-config")
|
|
11110
|
+
},
|
|
11111
|
+
{ additionalProperties: false }
|
|
11112
|
+
);
|
|
10908
11113
|
var ComputeBudgetSchema = typebox_exports.Object(
|
|
10909
11114
|
{
|
|
10910
11115
|
/** Total CPU core-hours allowed for this task. */
|
|
@@ -11828,6 +12033,61 @@ var GitBranchesSchema = typebox_exports.Object(
|
|
|
11828
12033
|
{ additionalProperties: false }
|
|
11829
12034
|
);
|
|
11830
12035
|
var NullableString = typebox_exports.Union([typebox_exports.String(), typebox_exports.Null()]);
|
|
12036
|
+
var SkillRepositoryAddInputSchema = typebox_exports.Unsafe(
|
|
12037
|
+
typebox_exports.Object(
|
|
12038
|
+
{
|
|
12039
|
+
kind: typebox_exports.Union([typebox_exports.Literal("git"), typebox_exports.Literal("local")]),
|
|
12040
|
+
source: typebox_exports.String({ minLength: 1, maxLength: 4096 }),
|
|
12041
|
+
ref: typebox_exports.Optional(typebox_exports.String({ minLength: 1, maxLength: 256 })),
|
|
12042
|
+
subpath: typebox_exports.Optional(typebox_exports.String({ maxLength: 1024 })),
|
|
12043
|
+
license: typebox_exports.String({ minLength: 1, maxLength: 256 }),
|
|
12044
|
+
licenseEvidence: typebox_exports.Optional(typebox_exports.String({ maxLength: 4096 })),
|
|
12045
|
+
name: typebox_exports.Optional(typebox_exports.String({ maxLength: 256 }))
|
|
12046
|
+
},
|
|
12047
|
+
{ additionalProperties: false }
|
|
12048
|
+
)
|
|
12049
|
+
);
|
|
12050
|
+
var SkillRepositoryRecordSchema = typebox_exports.Unsafe(
|
|
12051
|
+
typebox_exports.Object(
|
|
12052
|
+
{
|
|
12053
|
+
id: typebox_exports.String({ minLength: 1, maxLength: 64 }),
|
|
12054
|
+
name: typebox_exports.String({ minLength: 1, maxLength: 256 }),
|
|
12055
|
+
kind: typebox_exports.Union([typebox_exports.Literal("git"), typebox_exports.Literal("local")]),
|
|
12056
|
+
source: typebox_exports.String({ minLength: 1, maxLength: 4096 }),
|
|
12057
|
+
ref: typebox_exports.Optional(typebox_exports.String({ maxLength: 256 })),
|
|
12058
|
+
subpath: typebox_exports.Optional(typebox_exports.String({ maxLength: 1024 })),
|
|
12059
|
+
license: typebox_exports.String({ minLength: 1, maxLength: 256 }),
|
|
12060
|
+
licenseEvidence: typebox_exports.Optional(typebox_exports.String({ maxLength: 4096 })),
|
|
12061
|
+
status: typebox_exports.Union([typebox_exports.Literal("ready"), typebox_exports.Literal("update-available"), typebox_exports.Literal("error")]),
|
|
12062
|
+
skillCount: typebox_exports.Integer({ minimum: 0, maximum: 1e3 }),
|
|
12063
|
+
lastCheckedAt: typebox_exports.Optional(typebox_exports.String({ maxLength: 64 })),
|
|
12064
|
+
lastAppliedAt: typebox_exports.Optional(typebox_exports.String({ maxLength: 64 })),
|
|
12065
|
+
lastError: typebox_exports.Optional(typebox_exports.String({ maxLength: 2e3 })),
|
|
12066
|
+
updateAvailable: typebox_exports.Optional(typebox_exports.Boolean())
|
|
12067
|
+
},
|
|
12068
|
+
{ additionalProperties: false }
|
|
12069
|
+
)
|
|
12070
|
+
);
|
|
12071
|
+
var SkillRepositoryListSchema = typebox_exports.Array(SkillRepositoryRecordSchema, { maxItems: 100 });
|
|
12072
|
+
var SkillRepositoryCheckResultSchema = typebox_exports.Unsafe(
|
|
12073
|
+
typebox_exports.Object(
|
|
12074
|
+
{
|
|
12075
|
+
repository: SkillRepositoryRecordSchema,
|
|
12076
|
+
changedFiles: typebox_exports.Array(typebox_exports.String({ maxLength: 1024 }), { maxItems: 1e3 })
|
|
12077
|
+
},
|
|
12078
|
+
{ additionalProperties: false }
|
|
12079
|
+
)
|
|
12080
|
+
);
|
|
12081
|
+
var SkillRepositoryUpdateResultSchema = typebox_exports.Unsafe(
|
|
12082
|
+
typebox_exports.Object(
|
|
12083
|
+
{
|
|
12084
|
+
repository: SkillRepositoryRecordSchema,
|
|
12085
|
+
changedFiles: typebox_exports.Array(typebox_exports.String({ maxLength: 1024 }), { maxItems: 1e3 }),
|
|
12086
|
+
restartedRequired: typebox_exports.Literal(true)
|
|
12087
|
+
},
|
|
12088
|
+
{ additionalProperties: false }
|
|
12089
|
+
)
|
|
12090
|
+
);
|
|
11831
12091
|
var AppContract = defineDomain("app", {
|
|
11832
12092
|
methods: {
|
|
11833
12093
|
getInfo: {
|
|
@@ -11915,8 +12175,26 @@ var AppContract = defineDomain("app", {
|
|
|
11915
12175
|
checkForUpdates: { args: typebox_exports.Tuple([]), result: typebox_exports.Void() },
|
|
11916
12176
|
downloadUpdate: { args: typebox_exports.Tuple([]), result: typebox_exports.Void() },
|
|
11917
12177
|
installUpdate: { args: typebox_exports.Tuple([]), result: typebox_exports.Void() },
|
|
12178
|
+
checkResearchSkills: { args: typebox_exports.Tuple([]), result: typebox_exports.Void() },
|
|
11918
12179
|
updateResearchSkills: { args: typebox_exports.Tuple([]), result: typebox_exports.Void() },
|
|
11919
12180
|
restartForResearchSkills: { args: typebox_exports.Tuple([]), result: typebox_exports.Void() },
|
|
12181
|
+
listSkillRepositories: { args: typebox_exports.Tuple([]), result: SkillRepositoryListSchema },
|
|
12182
|
+
addSkillRepository: {
|
|
12183
|
+
args: typebox_exports.Tuple([SkillRepositoryAddInputSchema]),
|
|
12184
|
+
result: SkillRepositoryRecordSchema
|
|
12185
|
+
},
|
|
12186
|
+
checkSkillRepository: {
|
|
12187
|
+
args: typebox_exports.Tuple([typebox_exports.String({ minLength: 1, maxLength: 64 })]),
|
|
12188
|
+
result: SkillRepositoryCheckResultSchema
|
|
12189
|
+
},
|
|
12190
|
+
updateSkillRepository: {
|
|
12191
|
+
args: typebox_exports.Tuple([typebox_exports.String({ minLength: 1, maxLength: 64 })]),
|
|
12192
|
+
result: SkillRepositoryUpdateResultSchema
|
|
12193
|
+
},
|
|
12194
|
+
removeSkillRepository: {
|
|
12195
|
+
args: typebox_exports.Tuple([typebox_exports.String({ minLength: 1, maxLength: 64 })]),
|
|
12196
|
+
result: typebox_exports.Void()
|
|
12197
|
+
},
|
|
11920
12198
|
saveFileDialog: {
|
|
11921
12199
|
args: typebox_exports.Tuple([typebox_exports.String(), typebox_exports.String()]),
|
|
11922
12200
|
result: NullableString
|
|
@@ -11929,6 +12207,7 @@ var AppContract = defineDomain("app", {
|
|
|
11929
12207
|
result: NullableString
|
|
11930
12208
|
},
|
|
11931
12209
|
pickDirectory: { args: typebox_exports.Tuple([]), result: NullableString },
|
|
12210
|
+
formalKnowledgeVault: { args: typebox_exports.Tuple([]), result: NullableString },
|
|
11932
12211
|
getGitBranch: { args: typebox_exports.Tuple([typebox_exports.String()]), result: NullableString },
|
|
11933
12212
|
listGitBranches: { args: typebox_exports.Tuple([typebox_exports.String()]), result: GitBranchesSchema },
|
|
11934
12213
|
checkoutBranch: { args: typebox_exports.Tuple([typebox_exports.String(), typebox_exports.String()]), result: typebox_exports.String() }
|
|
@@ -12006,6 +12285,7 @@ var OnboardingStepArgs = typebox_exports.Tuple([
|
|
|
12006
12285
|
var ComputeContract = defineDomain("compute", {
|
|
12007
12286
|
methods: {
|
|
12008
12287
|
listHosts: { args: EmptyArgs, result: typebox_exports.Array(ComputeHostSchema, { maxItems: 256 }) },
|
|
12288
|
+
listSshConfig: { args: EmptyArgs, result: typebox_exports.Array(ComputeSshConfigHostSchema, { maxItems: 256 }) },
|
|
12009
12289
|
getHost: { args: IdArgs, result: typebox_exports.Union([ComputeHostSchema, typebox_exports.Null()]) },
|
|
12010
12290
|
saveHost: { args: typebox_exports.Tuple([ComputeHostInputSchema]), result: ComputeHostSchema },
|
|
12011
12291
|
removeHost: { args: IdArgs, result: typebox_exports.Void() },
|
|
@@ -12349,9 +12629,10 @@ var SpecialistSettingsInput = typebox_exports.Object(
|
|
|
12349
12629
|
);
|
|
12350
12630
|
var ZoteroStatusSchema = typebox_exports.Object(
|
|
12351
12631
|
{
|
|
12352
|
-
registered: typebox_exports.Boolean(),
|
|
12353
|
-
enabled: typebox_exports.Boolean(),
|
|
12632
|
+
registered: typebox_exports.Optional(typebox_exports.Boolean()),
|
|
12633
|
+
enabled: typebox_exports.Optional(typebox_exports.Boolean()),
|
|
12354
12634
|
command: typebox_exports.Union([typebox_exports.String(), typebox_exports.Null()]),
|
|
12635
|
+
version: typebox_exports.Optional(typebox_exports.Union([typebox_exports.String(), typebox_exports.Null()])),
|
|
12355
12636
|
localApiReachable: typebox_exports.Boolean(),
|
|
12356
12637
|
desktopDetected: typebox_exports.Boolean(),
|
|
12357
12638
|
desktopPath: typebox_exports.Union([typebox_exports.String(), typebox_exports.Null()]),
|
|
@@ -12539,6 +12820,10 @@ var KnowledgeContract = defineDomain("knowledge", {
|
|
|
12539
12820
|
args: OneObject(),
|
|
12540
12821
|
result: ResultObject()
|
|
12541
12822
|
},
|
|
12823
|
+
decideDailyRadarPaper: {
|
|
12824
|
+
args: OneObject(),
|
|
12825
|
+
result: ResultObject()
|
|
12826
|
+
},
|
|
12542
12827
|
getTopics: {
|
|
12543
12828
|
args: OneObject(),
|
|
12544
12829
|
result: ResultObject()
|
|
@@ -12547,6 +12832,13 @@ var KnowledgeContract = defineDomain("knowledge", {
|
|
|
12547
12832
|
args: OneObject(),
|
|
12548
12833
|
result: typebox_exports.Unknown()
|
|
12549
12834
|
},
|
|
12835
|
+
getMaintenanceSettings: { args: typebox_exports.Tuple([]), result: ResultObject() },
|
|
12836
|
+
saveMaintenanceSettings: {
|
|
12837
|
+
args: OneObject(),
|
|
12838
|
+
result: ResultObject()
|
|
12839
|
+
},
|
|
12840
|
+
runMaintenance: { args: OneObject(), result: ResultObject() },
|
|
12841
|
+
getMaintenanceRuns: { args: typebox_exports.Tuple([]), result: typebox_exports.Array(ResultObject()) },
|
|
12550
12842
|
getZoteroStatus: {
|
|
12551
12843
|
args: typebox_exports.Tuple([]),
|
|
12552
12844
|
result: ZoteroStatusSchema
|
|
@@ -12778,6 +13070,74 @@ var ConfiguredPackageInfoSchema = typebox_exports.Object(
|
|
|
12778
13070
|
},
|
|
12779
13071
|
{ additionalProperties: false }
|
|
12780
13072
|
);
|
|
13073
|
+
var PackageLifecycleEventSchema = typebox_exports.Object(
|
|
13074
|
+
{
|
|
13075
|
+
type: typebox_exports.Union([
|
|
13076
|
+
typebox_exports.Literal("staged"),
|
|
13077
|
+
typebox_exports.Literal("verified"),
|
|
13078
|
+
typebox_exports.Literal("enabled"),
|
|
13079
|
+
typebox_exports.Literal("disabled"),
|
|
13080
|
+
typebox_exports.Literal("drained"),
|
|
13081
|
+
typebox_exports.Literal("reloaded"),
|
|
13082
|
+
typebox_exports.Literal("reload_deferred"),
|
|
13083
|
+
typebox_exports.Literal("rolled_back"),
|
|
13084
|
+
typebox_exports.Literal("failed")
|
|
13085
|
+
]),
|
|
13086
|
+
at: typebox_exports.Number({ minimum: 0 }),
|
|
13087
|
+
sessionId: typebox_exports.Optional(typebox_exports.String({ minLength: 1 })),
|
|
13088
|
+
detail: typebox_exports.Optional(typebox_exports.String())
|
|
13089
|
+
},
|
|
13090
|
+
{ additionalProperties: false }
|
|
13091
|
+
);
|
|
13092
|
+
var PackageLifecycleErrorSchema = typebox_exports.Object(
|
|
13093
|
+
{
|
|
13094
|
+
code: typebox_exports.Union([
|
|
13095
|
+
typebox_exports.Literal("invalid-source"),
|
|
13096
|
+
typebox_exports.Literal("builtin"),
|
|
13097
|
+
typebox_exports.Literal("not-installed"),
|
|
13098
|
+
typebox_exports.Literal("unavailable"),
|
|
13099
|
+
typebox_exports.Literal("operation-failed")
|
|
13100
|
+
]),
|
|
13101
|
+
message: typebox_exports.String({ minLength: 1 }),
|
|
13102
|
+
retryable: typebox_exports.Boolean()
|
|
13103
|
+
},
|
|
13104
|
+
{ additionalProperties: false }
|
|
13105
|
+
);
|
|
13106
|
+
var PackageLifecycleReceiptSchema = typebox_exports.Object(
|
|
13107
|
+
{
|
|
13108
|
+
operation: typebox_exports.Union([typebox_exports.Literal("install"), typebox_exports.Literal("update"), typebox_exports.Literal("remove")]),
|
|
13109
|
+
packageName: typebox_exports.String({ minLength: 1 }),
|
|
13110
|
+
source: typebox_exports.String({ minLength: 1 }),
|
|
13111
|
+
scope: typebox_exports.Union([typebox_exports.Literal("user"), typebox_exports.Literal("project")]),
|
|
13112
|
+
status: typebox_exports.Union([typebox_exports.Literal("succeeded"), typebox_exports.Literal("failed")]),
|
|
13113
|
+
effect: typebox_exports.Union([
|
|
13114
|
+
typebox_exports.Literal("current-session"),
|
|
13115
|
+
typebox_exports.Literal("next-session"),
|
|
13116
|
+
typebox_exports.Literal("app-restart")
|
|
13117
|
+
]),
|
|
13118
|
+
version: typebox_exports.Optional(typebox_exports.String({ minLength: 1 })),
|
|
13119
|
+
previousVersion: typebox_exports.Optional(typebox_exports.String({ minLength: 1 })),
|
|
13120
|
+
events: typebox_exports.Array(PackageLifecycleEventSchema),
|
|
13121
|
+
error: typebox_exports.Optional(PackageLifecycleErrorSchema),
|
|
13122
|
+
reloadedSessionIds: typebox_exports.Optional(typebox_exports.Array(typebox_exports.String({ minLength: 1 }))),
|
|
13123
|
+
deferredSessionIds: typebox_exports.Optional(typebox_exports.Array(typebox_exports.String({ minLength: 1 })))
|
|
13124
|
+
},
|
|
13125
|
+
{ additionalProperties: false }
|
|
13126
|
+
);
|
|
13127
|
+
var RegistryPluginMetadataSchema = typebox_exports.Object(
|
|
13128
|
+
{
|
|
13129
|
+
name: typebox_exports.String({ minLength: 1 }),
|
|
13130
|
+
version: typebox_exports.Optional(typebox_exports.String({ minLength: 1 })),
|
|
13131
|
+
description: typebox_exports.Optional(typebox_exports.String()),
|
|
13132
|
+
capabilities: typebox_exports.Array(typebox_exports.String()),
|
|
13133
|
+
tools: typebox_exports.Array(typebox_exports.String()),
|
|
13134
|
+
permissions: typebox_exports.Optional(typebox_exports.Unknown()),
|
|
13135
|
+
hosts: typebox_exports.Array(typebox_exports.String()),
|
|
13136
|
+
packageKind: typebox_exports.Union([typebox_exports.Literal("pi"), typebox_exports.Literal("desktop-ui")]),
|
|
13137
|
+
manifestDeclared: typebox_exports.Boolean()
|
|
13138
|
+
},
|
|
13139
|
+
{ additionalProperties: false }
|
|
13140
|
+
);
|
|
12781
13141
|
var PackagesContract = defineDomain("packages", {
|
|
12782
13142
|
methods: {
|
|
12783
13143
|
searchCatalog: {
|
|
@@ -12786,16 +13146,33 @@ var PackagesContract = defineDomain("packages", {
|
|
|
12786
13146
|
args: SearchCatalogArgsSchema,
|
|
12787
13147
|
result: typebox_exports.Unsafe(CatalogSearchResultSchema)
|
|
12788
13148
|
},
|
|
13149
|
+
/** Latest published npm version per package name (null when unknown/offline). */
|
|
13150
|
+
latestPackageVersions: {
|
|
13151
|
+
args: typebox_exports.Tuple([typebox_exports.Array(typebox_exports.String({ minLength: 1 }), { maxItems: 50 })]),
|
|
13152
|
+
result: typebox_exports.Record(typebox_exports.String(), typebox_exports.Union([typebox_exports.String(), typebox_exports.Null()]))
|
|
13153
|
+
},
|
|
13154
|
+
/** Manifest declarations fetched from the npm registry before installation. */
|
|
13155
|
+
pluginPackageMetadata: {
|
|
13156
|
+
args: typebox_exports.Tuple([typebox_exports.Array(typebox_exports.String({ minLength: 1 }), { maxItems: 50 })]),
|
|
13157
|
+
result: typebox_exports.Record(
|
|
13158
|
+
typebox_exports.String(),
|
|
13159
|
+
typebox_exports.Union([typebox_exports.Null(), typebox_exports.Unsafe(RegistryPluginMetadataSchema)])
|
|
13160
|
+
)
|
|
13161
|
+
},
|
|
12789
13162
|
installPackage: {
|
|
12790
13163
|
args: typebox_exports.Tuple([typebox_exports.String({ minLength: 1 })]),
|
|
12791
|
-
result: typebox_exports.
|
|
13164
|
+
result: typebox_exports.Unsafe(PackageLifecycleReceiptSchema)
|
|
13165
|
+
},
|
|
13166
|
+
updatePackage: {
|
|
13167
|
+
args: typebox_exports.Tuple([typebox_exports.String({ minLength: 1 })]),
|
|
13168
|
+
result: typebox_exports.Unsafe(PackageLifecycleReceiptSchema)
|
|
12792
13169
|
},
|
|
12793
13170
|
removePackage: {
|
|
12794
13171
|
args: typebox_exports.Tuple([
|
|
12795
13172
|
typebox_exports.String({ minLength: 1 }),
|
|
12796
13173
|
typebox_exports.Union([typebox_exports.Literal("user"), typebox_exports.Literal("project")])
|
|
12797
13174
|
]),
|
|
12798
|
-
result: typebox_exports.
|
|
13175
|
+
result: typebox_exports.Unsafe(PackageLifecycleReceiptSchema)
|
|
12799
13176
|
},
|
|
12800
13177
|
listConfiguredPackages: {
|
|
12801
13178
|
args: typebox_exports.Tuple([]),
|
|
@@ -13112,6 +13489,10 @@ var SessionsContract = defineDomain("sessions", {
|
|
|
13112
13489
|
{ additionalProperties: false }
|
|
13113
13490
|
)
|
|
13114
13491
|
},
|
|
13492
|
+
setSkillNamesEnabled: {
|
|
13493
|
+
args: typebox_exports.Tuple([Id2, typebox_exports.Array(typebox_exports.String()), typebox_exports.Boolean()]),
|
|
13494
|
+
result: typebox_exports.Object({ disabled: typebox_exports.Array(typebox_exports.String()) }, { additionalProperties: false })
|
|
13495
|
+
},
|
|
13115
13496
|
compact: {
|
|
13116
13497
|
args: typebox_exports.Union([typebox_exports.Tuple([Id2]), typebox_exports.Tuple([Id2, typebox_exports.String()])]),
|
|
13117
13498
|
result: typebox_exports.Void()
|
|
@@ -1,10 +1,75 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 1,
|
|
3
3
|
"generator": "packages/pi-knowledge/scripts/build.mjs",
|
|
4
|
-
"artifactSource": "
|
|
4
|
+
"artifactSource": "source",
|
|
5
|
+
"sourceHashes": {
|
|
6
|
+
"src/core/capability-discovery.ts": "962bef1c1c6e9e30d585af8d2f4ce0f31766fde9ec4afea11365be8ea79d31ef",
|
|
7
|
+
"src/core/claim-conflicts.ts": "6b4e4bd055f1b9e76b973aa2a08a0e6548db812caa8a6d72c3c5d62584254d58",
|
|
8
|
+
"src/core/config.ts": "fd6015f981b5487bad8a3b1a0ecedb04a2e5e84991f38e7a1f8d0d0ea21b4960",
|
|
9
|
+
"src/core/daily-discovery-prompt.ts": "c28637942e1fd1c36a91c4dfb50a04a983a1e3bd7200d18d3f77ac2d520874f4",
|
|
10
|
+
"src/core/daily-discovery.ts": "02e54436862455e852b337f7f26780438f3591a85718645506a5b6596ef9087f",
|
|
11
|
+
"src/core/deliverable-review.ts": "808e3f5c1df55ceb78829edf22aa9d0d1639d20f3ff666fb7e51649c2c110e0f",
|
|
12
|
+
"src/core/evolution.ts": "f4167966c7ecaf8c93165831752129c02d85a0f024501dc5a61f66a3c33b8234",
|
|
13
|
+
"src/core/experience-store.ts": "84e191dd30b7006983d94110de070e98701d13456de777868327ac87f85f5e6f",
|
|
14
|
+
"src/core/extension-helpers.ts": "b48cb2b8d88989c845cf7644eb171f36466f0b4f8878af90531e21b0b90285fa",
|
|
15
|
+
"src/core/files.ts": "0ef27eafbd03a4facd512b37a6bc11a7b2edc16052a6a400c327ebf15dfa5de9",
|
|
16
|
+
"src/core/flow-cards.ts": "8cea1019c2c84b9322e45105479526d509fef2a14594b450f07f20cbd789ff0f",
|
|
17
|
+
"src/core/graph-cache.ts": "69877e42ea611ca0c2a244dd83017ce91de1d511735253bff815e5238e7b78d6",
|
|
18
|
+
"src/core/graph-retrieval.ts": "ac74005cf7fed222cb0548669608cd65ed3eb320bdef2e8537084d76c0ee8f2c",
|
|
19
|
+
"src/core/host.ts": "08cefa64947a98f96c91563f70beedaf941a811b57abf02418013f5afa75fd73",
|
|
20
|
+
"src/core/index.ts": "03360d191330d1be71541b1633814b76f4e4f07a48d652a45031edb17e6ec990",
|
|
21
|
+
"src/core/ingest-frontmatter.ts": "371fc6970211fd72a0efab65ff07abd1f470066c01e6c3b48c3dd771ee5ba68a",
|
|
22
|
+
"src/core/ingest-identity.ts": "7c631e59cb9efc1ee3df05732ee936e934388488979bdf83625b9c5e6432d75d",
|
|
23
|
+
"src/core/ingest-policy.ts": "c4d9fbae139d14bf1f93e050507a733e903e3b35f0e79b0e54b6b11816616386",
|
|
24
|
+
"src/core/layout.ts": "f302cd8eca85afbc0aebe35ba92fec75c5adf549ecbdfb122a80e47915a1d587",
|
|
25
|
+
"src/core/maintenance.ts": "1f74c220341bbd1aed9c658a1ef3aef40bdee659bc53449e13c37008b8b16567",
|
|
26
|
+
"src/core/memory-note.ts": "880b5d183c6522b25527cf6c4597b908d05aac6307cc97b519e355a38f53b3f7",
|
|
27
|
+
"src/core/metacognitive-policy.ts": "363fd45ab2445e2d564cf010d9eeff53a36af9fc4895d1ab3c137c7773ca81e5",
|
|
28
|
+
"src/core/note-title.ts": "5d7c4fd110ceafa74bc1cc0776bb87d53febc5762082dcd4fe38575c7b8fadfc",
|
|
29
|
+
"src/core/orchestration-policy.ts": "38119d774b07aea61e37ba3d9e3ba0589652fdd803f1769a0880f2a443bb0b61",
|
|
30
|
+
"src/core/project-identity.ts": "23910fc249949d2fca61533e304834822f381a255bcfccf09b46cc9ce0a659d9",
|
|
31
|
+
"src/core/publication-policy.ts": "41dbd70baffa78b01e4578c110a18b9c79bdab5416c9a5f03c945a2adc351cda",
|
|
32
|
+
"src/core/publication.ts": "0e1a371e4d84511bae34daf8c5421c9fdea7da0d0a3c636a9c3e439285cfe96d",
|
|
33
|
+
"src/core/recent-by-category.ts": "7e379051729d01f46ea06564cb919f0803e0bbb95bfdd4e2abc178dde28cc9e6",
|
|
34
|
+
"src/core/related-notes.ts": "616e05ab52b901ef4bcc20e7e309f0b018f4c9f71c3eda7fa3d9ad264f1382d6",
|
|
35
|
+
"src/core/reuse.ts": "31c85260b7d0357e2cfe9e568739631d10b14fa9be544e8b1b26c3e6d3954864",
|
|
36
|
+
"src/core/review-policy.ts": "534edf13a813888d770268c8d2f8f4e6c9d4564e30a22e4d9aad4767af9cca2a",
|
|
37
|
+
"src/core/runtime-host.ts": "17fde93803a035df1f774b4d96325d36d4e520b37b1fe388a46875873a0560a5",
|
|
38
|
+
"src/core/search-policy.ts": "f1fa9ff6858944ec1ab1dfd5cc172113f236e93180a8798bb653b98e287a4853",
|
|
39
|
+
"src/core/semantic-model.ts": "ad9afb9e88eb68abaf3ec84b1068ddfd44a89842a98f000be53aafd6cc831f39",
|
|
40
|
+
"src/core/semantic-provider.ts": "056ca7811a90ac0b06aed985079ac0e388c0388aeb0c88af3d1b2efaf5d7fbc0",
|
|
41
|
+
"src/core/semantic-settings.ts": "feb55700c4cbc668df453fd6db33ad0934169e0251bf957392fff1d84eedb897",
|
|
42
|
+
"src/core/service.ts": "731c4f84ce856829b62014747c3f8bb0dd836a6b96fa91b7a65fb7ecf30b1688",
|
|
43
|
+
"src/core/source-links.ts": "fab0136b5387a1f31374f265fc87bcc76ef7fbf18f716727381f8c3c90cf18f2",
|
|
44
|
+
"src/core/specialist-delivery.ts": "08cde6b80ad833e2f902e4da1088fc5d4304e847946a638f704cf08942327675",
|
|
45
|
+
"src/core/specialist-host.ts": "f8ba76bfba869aeeafaf60665b306efb80dc026e384ec70011651ff982fdd872",
|
|
46
|
+
"src/core/specialists.ts": "ce4b2bfb2f34d65cef04f02855e1f689fbef7f47dc62928ff0533ab13153968f",
|
|
47
|
+
"src/core/task-feedback.ts": "144926c766b1bdb1724fc9704f217a73f627d502a4dcb3ecac266098e42c7529",
|
|
48
|
+
"src/core/tool-budget.ts": "29b26bb53617efde0b5c180b4b764153c082ea6aa5f4a1f179d276e716312ec1",
|
|
49
|
+
"src/core/topic-candidate.ts": "f43f25ccb6d757fa97bedacb99e976c225bf665f89c62be2b7694ee540089ba0",
|
|
50
|
+
"src/core/topic-memory.ts": "94f3ec85a7e56e338671a0db636aeed79546b78c12c33df0c7f2587fdc17c76f",
|
|
51
|
+
"src/core/topic-probe.ts": "b6b80e8aba33c8319eff5862524d0e54bc0ed70516cc3ef4706999a3f66c3e61",
|
|
52
|
+
"src/core/ui-service.ts": "603991ba9cb4375bddec74aa8b339db09576628f9ca86745f7323b7a047ab334",
|
|
53
|
+
"src/core/ui-state.ts": "9b54f9e406c3287fdae6073b65a1cf361d75185e7f15de77587023e7d1eeec39",
|
|
54
|
+
"src/core/wiki-model-review.ts": "d7c6d17e218c64ba8040190b8a84595e3411b99195923c46b654b4f9bbb6e719",
|
|
55
|
+
"src/core/wiki-policy.ts": "ffd5f16638d2f31b49ecbb944683a13b503dac91fd499fb901124dad8cec2ff8",
|
|
56
|
+
"src/core/wiki-review.ts": "634b6ad5efc3b15b569d1e429ca23aae5171200f7599cee0ca14d5e97fac6a4f",
|
|
57
|
+
"src/core/worker.ts": "091c15bdf11e6375072152585c2de89a4267be3a5b19e9fb5aadd302a9ede31d",
|
|
58
|
+
"src/extension/internal-knowledge-extension.ts": "af59f7e8c32c550efa28f8c0a4b7397b539b5751cab5053ddff3dfabe3e57682",
|
|
59
|
+
"src/extension/knowledge-extension.ts": "5e76e1b7c1ad914355f13892ced890f455ce547f9c5e4cc04329232420f0fc73",
|
|
60
|
+
"src/extension/knowledge-worker.ts": "bf3bf802e766d34bd01d7d9e2af73dbcd98f2f9afd27f127b4bbf3de9f5015de",
|
|
61
|
+
"src/host.ts": "82dbdabd97476b1772d9a6497141d24caf157810ef7e491149ba5c0e6f75316a",
|
|
62
|
+
"src/index.ts": "50ec275274ddea56789763921ab75500e1ab58ad26ceca7f91b449fcc2cc7432",
|
|
63
|
+
"src/maintenance/plan.ts": "c89ad7bde64266ba48056fc77b4f9fdceacbd64ab767bf2b2cd917acc05de52d",
|
|
64
|
+
"src/maintenance/prompts.ts": "16cc4408f10b679550ce91aa339ce4aab932ef00d7e263c68cc48acf6ffa8e9c",
|
|
65
|
+
"src/maintenance/run.ts": "2575e35c4a879955e0e0d6dae32456318a34fef8ea6d19a63797bbd06d2f3460"
|
|
66
|
+
},
|
|
5
67
|
"outputs": {
|
|
6
|
-
"dist/index.mjs": "
|
|
7
|
-
"
|
|
68
|
+
"dist/index.mjs": "288560ce36b5ee78af1b16315d0185e4c9d15026b027fc2a4229f7687d3cef7e",
|
|
69
|
+
"dist/host.mjs": "833ae0c431fd38bd38b9bb959cbfb68d6ed2d9b832fbb20f7a7693e6afa8fb33",
|
|
70
|
+
"dist/host.d.ts": "e3c39a52cae72e221fe82c53390d9ccc6acb81a92a1723ef1a826d37bf7ebd81",
|
|
71
|
+
"lib/knowledge/runtime/worker.mjs": "0ba2740573429c6de789f495f2cddf06cc3801dfb7ffeca70ac0aeb512c461d0",
|
|
72
|
+
"lib/knowledge/runtime/.knowledge-worker-manifest.json": "f91da3a88692c296185180fbf30860c2f6d362ba10dd64dc2250d3f3fe2d6c96"
|
|
8
73
|
},
|
|
9
74
|
"skills": [
|
|
10
75
|
"skills/research-vault/SKILL.md",
|