@pellux/goodvibes-agent 1.1.2 → 1.1.4
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/CHANGELOG.md +12 -0
- package/README.md +1 -1
- package/dist/package/main.js +862 -337
- package/docs/channels-remote-and-api.md +1 -1
- package/docs/connected-host.md +1 -1
- package/docs/getting-started.md +1 -1
- package/docs/knowledge-artifacts-and-multimodal.md +1 -1
- package/docs/tools-and-commands.md +1 -1
- package/package.json +2 -2
- package/release/release-notes.md +1 -1
- package/release/release-readiness.json +4 -4
- package/src/agent/knowledge-scope-alias.ts +56 -0
- package/src/cli/agent-knowledge-runtime.ts +25 -9
- package/src/input/agent-workspace-activation.ts +11 -1
- package/src/input/agent-workspace-categories.ts +225 -69
- package/src/input/agent-workspace-category-actions.ts +25 -0
- package/src/input/agent-workspace-settings.ts +314 -0
- package/src/input/agent-workspace-types.ts +14 -1
- package/src/input/agent-workspace.ts +69 -34
- package/src/renderer/agent-workspace.ts +13 -12
- package/src/tools/agent-harness-ui-surface-metadata.ts +1 -1
- package/src/tools/agent-harness-workspace-actions.ts +2 -2
- package/src/version.ts +1 -1
|
@@ -47,7 +47,7 @@ Use public connected-host/operator routes only. For Agent Knowledge, the only va
|
|
|
47
47
|
/api/goodvibes-agent/knowledge/*
|
|
48
48
|
```
|
|
49
49
|
|
|
50
|
-
If an Agent-specific route is missing, fail closed or show guidance. Do not substitute the default knowledge, another product segment, or private connected-host files.
|
|
50
|
+
If an Agent-specific route is missing, fail closed or show guidance. Do not substitute the default knowledge, another product segment, or private connected-host files. Normalize parseable public Agent-route scope aliases before rendering, and fail the call when the response carries known non-Agent contamination.
|
|
51
51
|
|
|
52
52
|
Harness and settings operations use the Agent-owned `agent_harness` tool. Generic settings/context mutators are not the model-facing Agent contract.
|
|
53
53
|
|
package/docs/connected-host.md
CHANGED
|
@@ -79,6 +79,6 @@ The model can inspect live connected-host readiness with `agent_harness` mode `c
|
|
|
79
79
|
|
|
80
80
|
The model can inspect companion pairing posture with `agent_harness` mode `pairing_posture`, and inspect one pairing/mobile route with `pairing_route`. Those modes report the control-plane endpoint binding, pairing surface id, token presence/fingerprint, and route catalog without returning raw tokens or QR payloads. Pairing display, manual token display, companion connection, channel delivery, task, approval, provider/model, and attachment actions remain visible user flows.
|
|
81
81
|
|
|
82
|
-
Agent Knowledge is its own product segment. Agent uses `/api/goodvibes-agent/knowledge/*` only and must not fall back to default knowledge or other product-specific knowledge routes. Agent
|
|
82
|
+
Agent Knowledge is its own product segment. Agent uses `/api/goodvibes-agent/knowledge/*` only and must not fall back to default knowledge or other product-specific knowledge routes. Agent normalizes public Agent-route scope aliases and rejects successful-looking responses that carry known non-Agent payload markers.
|
|
83
83
|
|
|
84
84
|
Normal assistant chat uses companion chat. Build/fix/review work is delegated explicitly to GoodVibes TUI through public runtime/session contracts, and delegated review is requested only when explicitly asked for build/fix/review work.
|
package/docs/getting-started.md
CHANGED
|
@@ -130,7 +130,7 @@ Use Agent Workspace -> Knowledge for source-backed Agent Knowledge. The valid co
|
|
|
130
130
|
/api/goodvibes-agent/knowledge/*
|
|
131
131
|
```
|
|
132
132
|
|
|
133
|
-
Agent commands fail closed if the route is unavailable or a successful-looking response
|
|
133
|
+
Agent commands fail closed if the route is unavailable or a successful-looking response carries non-Agent contamination. Parseable public Agent-route scope aliases are normalized before rendering.
|
|
134
134
|
|
|
135
135
|
The Knowledge workspace also exposes route-backed and command-backed workflows for issue review, prompt packet previews, context-selection explain output, consolidation, and reindex. Read-only ask/search/list/get/map/connector/packet/explain paths do not require mutation confirmation. Ingest, review-issue, consolidation, and reindex paths require explicit confirmation.
|
|
136
136
|
|
|
@@ -43,7 +43,7 @@ If those routes are unavailable, Agent commands fail closed with a structured er
|
|
|
43
43
|
|
|
44
44
|
The CLI and slash-command layers reject route-selection flags such as `--space`, `--knowledge-space`, `--knowledge-space-id`, and `--include-all-spaces` because those would violate the Agent product boundary.
|
|
45
45
|
|
|
46
|
-
Successful route responses are validated before rendering. If a connected host response
|
|
46
|
+
Successful route responses are validated before rendering. Parseable public Agent-route scope aliases are normalized. If a connected host response carries known non-Agent payload markers or unparseable default-scope text, Agent returns a `scope_contamination` error instead of treating that payload as isolated Agent Knowledge.
|
|
47
47
|
|
|
48
48
|
Agent Knowledge writes are explicit-user-action paths. Slash commands that ingest, import, review issues, reindex, or run consolidation require `--yes`; ask/search/status/list/get/map/connector paths remain read-only.
|
|
49
49
|
|
|
@@ -163,7 +163,7 @@ goodvibes-agent knowledge reindex --yes
|
|
|
163
163
|
/knowledge consolidate light --yes
|
|
164
164
|
```
|
|
165
165
|
|
|
166
|
-
Agent rejects route-selection flags that would target another knowledge space, including `--space`, `--knowledge-space`, `--knowledge-space-id`, and `--include-all-spaces`.
|
|
166
|
+
Agent rejects route-selection flags that would target another knowledge space, including `--space`, `--knowledge-space`, `--knowledge-space-id`, and `--include-all-spaces`. Parseable public Agent-route scope aliases are normalized; contaminated connected-host responses return `scope_contamination`.
|
|
167
167
|
|
|
168
168
|
## Approvals, Automation, And Schedules
|
|
169
169
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pellux/goodvibes-agent",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.4",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "GoodVibes personal operator assistant TUI with a proactive Agent product brain, isolated Agent Knowledge, local profiles, routines, skills, personas, and explicit build delegation.",
|
|
6
6
|
"type": "module",
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
},
|
|
88
88
|
"dependencies": {},
|
|
89
89
|
"devDependencies": {
|
|
90
|
-
"@pellux/goodvibes-sdk": "0.33.
|
|
90
|
+
"@pellux/goodvibes-sdk": "0.33.37",
|
|
91
91
|
"sql.js": "^1.14.1",
|
|
92
92
|
"sqlite-vec": "^0.1.9",
|
|
93
93
|
"zustand": "^5.0.12",
|
package/release/release-notes.md
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
- Completed resilient shortcut/keybinding discovery: `agent_harness` returns fixed shortcuts and default-fallback keybinding descriptors when the live keybinding manager is absent, while keybinding execution and mutation still fail closed until the runtime manager is available.
|
|
14
14
|
- Completed the model-visible operator method catalog: `agent_harness` can now list and inspect allowlisted public operator and Agent Knowledge methods with their owning first-class model tools, confirmation policy, and boundaries, without exposing arbitrary route invocation.
|
|
15
15
|
- Expanded first-class Agent Knowledge reads: `agent_knowledge` now covers status, ask, search, source/node/issue lists, item lookup, map summary, connector list/detail, and connector doctor while staying inside `/api/goodvibes-agent/knowledge/*`.
|
|
16
|
-
- Added
|
|
16
|
+
- Added Agent-owned Knowledge response-scope validation: CLI, model tools, and live verification normalize public Agent-route scope aliases and reject successful-looking payloads with known non-Agent payload markers.
|
|
17
17
|
- Expanded release-route enforcement for Agent Knowledge: architecture/package policy now guards the full route catalog, and live verification definitions include source, node, issue, map, and connector read routes in addition to status, ask, and search.
|
|
18
18
|
- Verified the release line against connected-host public Agent routes for Agent Knowledge alias scope normalization and telephony channel surface support.
|
|
19
19
|
- Renamed active release evidence artifacts to current-release paths under `release/`, including release notes, readiness inventory, performance snapshot, and live-verification reports, so current release metadata no longer depends on stale historical filenames.
|
|
@@ -123,8 +123,8 @@
|
|
|
123
123
|
"capabilityCoverage": "Covers isolated Agent Knowledge ask, search, source review, connectors, ingest, reindex, consolidation, graph operations, and status without default knowledge fallback.",
|
|
124
124
|
"userAccess": "The user can operate Agent Knowledge from the workspace, /knowledge, and goodvibes-agent knowledge CLI mirrors.",
|
|
125
125
|
"modelAccess": "agent_knowledge and agent_knowledge_ingest expose status, ask/search, source/node/issue lists, item lookup, map summary, connector inspection, and ingest; agent_harness mode:\"workspace_actions\", mode:\"workspace_action\", mode:\"run_workspace_action\", mode:\"commands\", mode:\"command\", mode:\"run_command\", mode:\"operator_methods\", mode:\"operator_method\", mode:\"tools\", and mode:\"tool\" expose review, packet/explain, consolidation, reindex, tool schemas, and route metadata to the model.",
|
|
126
|
-
"safetyBoundary": "Connected-host Knowledge traffic targets only /api/goodvibes-agent/knowledge/*, rejects non-Agent space-selection flags,
|
|
127
|
-
"releaseEvidence": "Package-facing required text, architecture policy, readiness evidence, and live verification checks require isolated Knowledge status, ask, search, library, item, map, connector outcomes, and response
|
|
126
|
+
"safetyBoundary": "Connected-host Knowledge traffic targets only /api/goodvibes-agent/knowledge/*, rejects non-Agent space-selection flags, normalizes parseable public Agent-route scope aliases, and fails closed on known non-Agent payload markers; local Knowledge service review/consolidation routes remain isolated to Agent Knowledge.",
|
|
127
|
+
"releaseEvidence": "Package-facing required text, architecture policy, readiness evidence, and live verification checks require isolated Knowledge status, ask, search, library, item, map, connector outcomes, Agent-route scope alias normalization, and response contamination detection."
|
|
128
128
|
}
|
|
129
129
|
},
|
|
130
130
|
{
|
|
@@ -453,8 +453,8 @@
|
|
|
453
453
|
"capabilityCoverage": "Covers Agent Knowledge handlers, ingestion, connectors, graph operations, refinement, jobs, schedules, ask, search, and status through isolated connected-host routes.",
|
|
454
454
|
"userAccess": "The user can operate isolated Agent Knowledge from TUI and CLI without selecting or leaking into non-Agent knowledge spaces.",
|
|
455
455
|
"modelAccess": "agent_knowledge, agent_knowledge_ingest, agent_harness mode:\"operator_methods\" and mode:\"operator_method\", and connected-host capability reports expose isolated Knowledge operation to the model.",
|
|
456
|
-
"safetyBoundary": "Only /api/goodvibes-agent/knowledge/* routes are allowed
|
|
457
|
-
"releaseEvidence": "Readiness evidence cites connected-host evidence alias and Knowledge docs, with live verification requiring isolated status, ask, search, library, item, map, connector checks, and response
|
|
456
|
+
"safetyBoundary": "Only /api/goodvibes-agent/knowledge/* routes are allowed. Agent rejects alternate knowledge space routing, normalizes parseable public Agent-route scope aliases, and fails closed on known non-Agent payload markers.",
|
|
457
|
+
"releaseEvidence": "Readiness evidence cites connected-host evidence alias and Knowledge docs, with live verification requiring isolated status, ask, search, library, item, map, connector checks, Agent-route scope alias normalization, and response contamination detection."
|
|
458
458
|
}
|
|
459
459
|
},
|
|
460
460
|
{
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import {
|
|
2
|
+
DEFAULT_KNOWLEDGE_SPACE_ID,
|
|
3
|
+
goodVibesAgentKnowledgeSpaceId,
|
|
4
|
+
} from '@pellux/goodvibes-sdk/platform/knowledge';
|
|
5
|
+
|
|
6
|
+
type JsonRecord = Record<string, unknown>;
|
|
7
|
+
|
|
8
|
+
const AGENT_KNOWLEDGE_PUBLIC_SPACE_ID = goodVibesAgentKnowledgeSpaceId();
|
|
9
|
+
const AGENT_KNOWLEDGE_SCOPE_FIELDS = new Set(['spaceId', 'knowledgeSpaceId', 'namespace']);
|
|
10
|
+
|
|
11
|
+
function isRecord(value: unknown): value is JsonRecord {
|
|
12
|
+
return Boolean(value) && typeof value === 'object' && !Array.isArray(value);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function isDefaultScopeValue(value: unknown): boolean {
|
|
16
|
+
return typeof value === 'string' && value.trim().toLowerCase() === DEFAULT_KNOWLEDGE_SPACE_ID;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export function normalizeAgentKnowledgeScopeAliases<TValue>(value: TValue): TValue {
|
|
20
|
+
if (Array.isArray(value)) {
|
|
21
|
+
let changed = false;
|
|
22
|
+
const normalized = value.map((item) => {
|
|
23
|
+
const next = normalizeAgentKnowledgeScopeAliases(item);
|
|
24
|
+
if (next !== item) changed = true;
|
|
25
|
+
return next;
|
|
26
|
+
});
|
|
27
|
+
return (changed ? normalized : value) as TValue;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
if (!isRecord(value)) return value;
|
|
31
|
+
|
|
32
|
+
let changed = false;
|
|
33
|
+
const output: JsonRecord = {};
|
|
34
|
+
for (const [key, nested] of Object.entries(value)) {
|
|
35
|
+
if (AGENT_KNOWLEDGE_SCOPE_FIELDS.has(key) && isDefaultScopeValue(nested)) {
|
|
36
|
+
output[key] = AGENT_KNOWLEDGE_PUBLIC_SPACE_ID;
|
|
37
|
+
changed = true;
|
|
38
|
+
continue;
|
|
39
|
+
}
|
|
40
|
+
const normalized = normalizeAgentKnowledgeScopeAliases(nested);
|
|
41
|
+
output[key] = normalized;
|
|
42
|
+
if (normalized !== nested) changed = true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
return (changed ? output : value) as TValue;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function normalizeAgentKnowledgeJsonText(body: string): string {
|
|
49
|
+
try {
|
|
50
|
+
const parsed = JSON.parse(body) as unknown;
|
|
51
|
+
const normalized = normalizeAgentKnowledgeScopeAliases(parsed);
|
|
52
|
+
return normalized === parsed ? body : JSON.stringify(normalized);
|
|
53
|
+
} catch {
|
|
54
|
+
return body;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { createBrowserAgentSdk } from '@pellux/goodvibes-sdk/browser/agent';
|
|
1
|
+
import { createBrowserAgentSdk, type BrowserAgentSdk } from '@pellux/goodvibes-sdk/browser/agent';
|
|
2
2
|
import { summarizeError } from '@pellux/goodvibes-sdk/platform/utils';
|
|
3
3
|
import { VERSION } from '../version.ts';
|
|
4
|
+
import { normalizeAgentKnowledgeScopeAliases } from '../agent/knowledge-scope-alias.ts';
|
|
4
5
|
import { readConnectedHostOperatorToken } from '../runtime/connected-host-auth.ts';
|
|
5
6
|
import type { ConnectedHostCallMethod } from './agent-knowledge-methods.ts';
|
|
6
7
|
|
|
@@ -106,18 +107,32 @@ export async function classifyKnowledgeError(error: unknown, connection: AgentKn
|
|
|
106
107
|
return { ok: false, kind: 'connected_host_error', error: message, baseUrl: connection.baseUrl, route };
|
|
107
108
|
}
|
|
108
109
|
|
|
109
|
-
export function
|
|
110
|
-
return
|
|
110
|
+
export function normalizeAgentKnowledgeData<TData>(data: TData): TData {
|
|
111
|
+
return normalizeAgentKnowledgeScopeAliases(data);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export function createAgentSdk(connection: AgentKnowledgeConnection): BrowserAgentSdk {
|
|
115
|
+
const sdk = createBrowserAgentSdk({
|
|
111
116
|
baseUrl: connection.baseUrl,
|
|
112
117
|
authToken: connection.token,
|
|
113
118
|
});
|
|
119
|
+
return {
|
|
120
|
+
...sdk,
|
|
121
|
+
knowledge: {
|
|
122
|
+
...sdk.knowledge,
|
|
123
|
+
ask: async (input) => normalizeAgentKnowledgeData(await sdk.knowledge.ask(input)),
|
|
124
|
+
search: async (input) => normalizeAgentKnowledgeData(await sdk.knowledge.search(input)),
|
|
125
|
+
status: async (input) => normalizeAgentKnowledgeData(await sdk.knowledge.status(input)),
|
|
126
|
+
map: async (input) => normalizeAgentKnowledgeData(await sdk.knowledge.map(input)),
|
|
127
|
+
},
|
|
128
|
+
};
|
|
114
129
|
}
|
|
115
130
|
|
|
116
|
-
const AGENT_KNOWLEDGE_SCOPE_KEYS = new Set(['spaceid', 'knowledgespaceid']);
|
|
131
|
+
const AGENT_KNOWLEDGE_SCOPE_KEYS = new Set(['spaceid', 'knowledgespaceid', 'namespace']);
|
|
117
132
|
const AGENT_KNOWLEDGE_SCOPE_TEXT_PATTERNS: readonly { readonly label: string; readonly pattern: RegExp }[] = [
|
|
118
133
|
{
|
|
119
134
|
label: 'default knowledge scope id',
|
|
120
|
-
pattern: /["']?(?:knowledge[-_\s]*space[-_\s]*id|knowledgespaceid|space[-_\s]*id|spaceid)["']?\s*[:=]\s*["']?default["']?/i,
|
|
135
|
+
pattern: /["']?(?:knowledge[-_\s]*space[-_\s]*id|knowledgespaceid|space[-_\s]*id|spaceid|namespace)["']?\s*[:=]\s*["']?default["']?/i,
|
|
121
136
|
},
|
|
122
137
|
{ label: 'host assistant payload marker', pattern: /home\s*assistant/i },
|
|
123
138
|
{ label: 'host graph payload marker', pattern: /home\s*graph|homegraph/i },
|
|
@@ -189,9 +204,10 @@ export function validateAgentKnowledgeData<TData>(
|
|
|
189
204
|
connection: AgentKnowledgeConnection,
|
|
190
205
|
method: ConnectedHostCallMethod,
|
|
191
206
|
): AgentKnowledgeResult<TData> {
|
|
192
|
-
const
|
|
207
|
+
const normalized = normalizeAgentKnowledgeData(data);
|
|
208
|
+
const contamination = findAgentKnowledgeScopeContamination(normalized);
|
|
193
209
|
if (contamination) return agentKnowledgeScopeContaminationFailure(connection, method.route, contamination);
|
|
194
|
-
return { ok: true, kind: method.kind, route: method.route, data };
|
|
210
|
+
return { ok: true, kind: method.kind, route: method.route, data: normalized };
|
|
195
211
|
}
|
|
196
212
|
|
|
197
213
|
export async function postAgentKnowledgeJson<TData>(
|
|
@@ -220,7 +236,7 @@ export async function postAgentKnowledgeJson<TData>(
|
|
|
220
236
|
const detail = isRecord(parsed) && typeof parsed.error === 'string' ? parsed.error : text;
|
|
221
237
|
throw new Error(`HTTP ${response.status} ${response.statusText}${detail ? `: ${detail}` : ''}`);
|
|
222
238
|
}
|
|
223
|
-
return parsed as TData;
|
|
239
|
+
return normalizeAgentKnowledgeData(parsed as TData);
|
|
224
240
|
}
|
|
225
241
|
|
|
226
242
|
function queryRoute(route: string, query: JsonRecord): string {
|
|
@@ -264,7 +280,7 @@ export async function getAgentKnowledgeJson<TData>(
|
|
|
264
280
|
const detail = isRecord(parsed) && typeof parsed.error === 'string' ? parsed.error : text;
|
|
265
281
|
throw new Error(`HTTP ${response.status} ${response.statusText}${detail ? `: ${detail}` : ''}`);
|
|
266
282
|
}
|
|
267
|
-
return parsed as TData;
|
|
283
|
+
return normalizeAgentKnowledgeData(parsed as TData);
|
|
268
284
|
}
|
|
269
285
|
|
|
270
286
|
export function findDisallowedKnowledgeScopeFlag(args: readonly string[]): string | null {
|
|
@@ -36,6 +36,8 @@ interface AgentWorkspaceActivationHost {
|
|
|
36
36
|
moveLocalLibraryItemSelection(kind: AgentWorkspaceLocalEditorKind, delta: number): void;
|
|
37
37
|
selectedLocalLibraryItem(kind: AgentWorkspaceLocalEditorKind): AgentWorkspaceLocalLibraryItem | null;
|
|
38
38
|
applyLocalLibraryOperation(operation: AgentWorkspaceLocalOperation): void;
|
|
39
|
+
applySettingAction(action: AgentWorkspaceCategory['actions'][number], requestRender?: () => void): void;
|
|
40
|
+
importTuiSettings(requestRender?: () => void): void;
|
|
39
41
|
completeOnboarding(): void;
|
|
40
42
|
hasCommandDispatch(): boolean;
|
|
41
43
|
dispatchWorkspaceCommand: AgentWorkspaceCommandDispatcher;
|
|
@@ -57,6 +59,14 @@ export function activateAgentWorkspaceSelection(
|
|
|
57
59
|
if (!workspace.commitActionSearchSelection()) return;
|
|
58
60
|
const action = workspace.selectedAction;
|
|
59
61
|
if (!action) return;
|
|
62
|
+
if (action.kind === 'setting') {
|
|
63
|
+
workspace.applySettingAction(action, requestRender);
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
if (action.kind === 'settings-import') {
|
|
67
|
+
workspace.importTuiSettings(requestRender);
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
60
70
|
if (action.kind === 'editor' && action.editorKind) {
|
|
61
71
|
const editor = createAgentWorkspaceEditor(action.editorKind, {
|
|
62
72
|
runtimeStarterTemplates: workspace.runtimeSnapshot?.runtimeStarterTemplates ?? [],
|
|
@@ -146,7 +156,7 @@ export function activateAgentWorkspaceSelection(
|
|
|
146
156
|
workspace.lastActionResult = {
|
|
147
157
|
kind: 'dispatched',
|
|
148
158
|
title: `Opening ${action.label}`,
|
|
149
|
-
detail: 'The workspace handed this
|
|
159
|
+
detail: 'The workspace handed this command to the shell-owned command router.',
|
|
150
160
|
command: action.command,
|
|
151
161
|
safety: action.safety,
|
|
152
162
|
};
|