@osovv/vv-opencode 2.0.1 → 2.1.0
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 +42 -0
- package/README.md +87 -86
- package/dist/commands/completion.js +0 -1
- package/dist/commands/completion.js.map +1 -1
- package/dist/commands/doctor.js +6 -9
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/init.d.ts +2 -1
- package/dist/commands/init.js +7 -12
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/install.d.ts +4 -0
- package/dist/commands/install.js +40 -37
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/launch.d.ts +2 -1
- package/dist/commands/launch.js +18 -14
- package/dist/commands/launch.js.map +1 -1
- package/dist/commands/patch-provider.d.ts +225 -307
- package/dist/commands/patch-provider.js +92 -296
- package/dist/commands/patch-provider.js.map +1 -1
- package/dist/commands/status.js +7 -10
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/sync.d.ts +4 -0
- package/dist/commands/sync.js +38 -35
- package/dist/commands/sync.js.map +1 -1
- package/dist/index.d.ts +25 -5
- package/dist/index.js +73 -34
- package/dist/index.js.map +1 -1
- package/dist/lib/agent-tool-catalog.d.ts +1 -1
- package/dist/lib/agent-tool-catalog.js +3 -6
- package/dist/lib/agent-tool-catalog.js.map +1 -1
- package/dist/lib/agent-tool-contract.d.ts +22 -13
- package/dist/lib/agent-tool-contract.js +20 -20
- package/dist/lib/agent-tool-contract.js.map +1 -1
- package/dist/lib/analytics/types.d.ts +7 -1
- package/dist/lib/analytics/types.js +2 -2
- package/dist/lib/analytics/types.js.map +1 -1
- package/dist/lib/config-layers.d.ts +28 -6
- package/dist/lib/config-layers.js +268 -73
- package/dist/lib/config-layers.js.map +1 -1
- package/dist/lib/managed-agents.d.ts +24 -2
- package/dist/lib/managed-agents.js +45 -15
- package/dist/lib/managed-agents.js.map +1 -1
- package/dist/lib/model-roles.d.ts +5 -0
- package/dist/lib/model-roles.js +22 -1
- package/dist/lib/model-roles.js.map +1 -1
- package/dist/lib/opencode/agent-registrations.d.ts +4 -4
- package/dist/lib/opencode/agent-registrations.js +386 -197
- package/dist/lib/opencode/agent-registrations.js.map +1 -1
- package/dist/lib/opencode/inspection.d.ts +13 -13
- package/dist/lib/opencode/inspection.js +69 -106
- package/dist/lib/opencode/inspection.js.map +1 -1
- package/dist/lib/opencode/model-overrides.d.ts +2 -2
- package/dist/lib/opencode/model-overrides.js +192 -47
- package/dist/lib/opencode/model-overrides.js.map +1 -1
- package/dist/lib/opencode/paths.d.ts +6 -2
- package/dist/lib/opencode/paths.js +12 -11
- package/dist/lib/opencode/paths.js.map +1 -1
- package/dist/lib/opencode/plugin-registration.d.ts +10 -11
- package/dist/lib/opencode/plugin-registration.js +76 -138
- package/dist/lib/opencode/plugin-registration.js.map +1 -1
- package/dist/lib/opencode/shared-utils.d.ts +47 -3
- package/dist/lib/opencode/shared-utils.js +346 -15
- package/dist/lib/opencode/shared-utils.js.map +1 -1
- package/dist/lib/opencode.d.ts +5 -6
- package/dist/lib/opencode.js +10 -10
- package/dist/lib/opencode.js.map +1 -1
- package/dist/lib/vvoc-config.js +4 -4
- package/dist/lib/vvoc-config.js.map +1 -1
- package/dist/lib/vvoc-paths.d.ts +7 -0
- package/dist/lib/vvoc-paths.js +15 -1
- package/dist/lib/vvoc-paths.js.map +1 -1
- package/dist/lib/vvoc-preset-registry.d.ts +38 -50
- package/dist/lib/vvoc-preset-registry.js +38 -48
- package/dist/lib/vvoc-preset-registry.js.map +1 -1
- package/dist/plugins/analytics/index.d.ts +20 -14
- package/dist/plugins/analytics/index.js +281 -133
- package/dist/plugins/analytics/index.js.map +1 -1
- package/dist/plugins/guardian/index.d.ts +63 -42
- package/dist/plugins/guardian/index.js +217 -759
- package/dist/plugins/guardian/index.js.map +1 -1
- package/dist/plugins/hashline-edit/index.d.ts +145 -31
- package/dist/plugins/hashline-edit/index.js +679 -244
- package/dist/plugins/hashline-edit/index.js.map +1 -1
- package/dist/plugins/hashline-edit/schemas.d.ts +1 -1
- package/dist/plugins/hashline-edit/schemas.js +3 -3
- package/dist/plugins/hashline-edit/schemas.js.map +1 -1
- package/dist/plugins/model-roles/index.d.ts +18 -4
- package/dist/plugins/model-roles/index.js +44 -181
- package/dist/plugins/model-roles/index.js.map +1 -1
- package/dist/plugins/peak-hours/index.d.ts +23 -23
- package/dist/plugins/peak-hours/index.js +211 -180
- package/dist/plugins/peak-hours/index.js.map +1 -1
- package/dist/plugins/secrets-redaction/deep.js +35 -51
- package/dist/plugins/secrets-redaction/deep.js.map +1 -1
- package/dist/plugins/secrets-redaction/index.d.ts +96 -8
- package/dist/plugins/secrets-redaction/index.js +290 -102
- package/dist/plugins/secrets-redaction/index.js.map +1 -1
- package/dist/plugins/secrets-redaction/session.d.ts +9 -0
- package/dist/plugins/secrets-redaction/session.js +21 -4
- package/dist/plugins/secrets-redaction/session.js.map +1 -1
- package/dist/plugins/secrets-redaction/stream.d.ts +92 -0
- package/dist/plugins/secrets-redaction/stream.js +772 -0
- package/dist/plugins/secrets-redaction/stream.js.map +1 -0
- package/dist/plugins/spec-guard/index.d.ts +49 -18
- package/dist/plugins/spec-guard/index.js +231 -129
- package/dist/plugins/spec-guard/index.js.map +1 -1
- package/dist/plugins/system-context-injection/index.d.ts +10 -4
- package/dist/plugins/system-context-injection/index.js +271 -78
- package/dist/plugins/system-context-injection/index.js.map +1 -1
- package/dist/plugins/tool-history-compaction/index.d.ts +26 -4
- package/dist/plugins/tool-history-compaction/index.js +170 -32
- package/dist/plugins/tool-history-compaction/index.js.map +1 -1
- package/dist/plugins/tool-history-compaction/transform.d.ts +47 -16
- package/dist/plugins/tool-history-compaction/transform.js +173 -55
- package/dist/plugins/tool-history-compaction/transform.js.map +1 -1
- package/dist/plugins/web-tools/fetch-service.d.ts +51 -13
- package/dist/plugins/web-tools/fetch-service.js +106 -75
- package/dist/plugins/web-tools/fetch-service.js.map +1 -1
- package/dist/plugins/web-tools/index.d.ts +58 -16
- package/dist/plugins/web-tools/index.js +202 -91
- package/dist/plugins/web-tools/index.js.map +1 -1
- package/dist/plugins/web-tools/media-loader.d.ts +3 -3
- package/dist/plugins/web-tools/media-loader.js +3 -3
- package/dist/plugins/web-tools/media-loader.js.map +1 -1
- package/dist/plugins/web-tools/providers/native-fetch.d.ts +2 -2
- package/dist/plugins/web-tools/providers/native-fetch.js +1 -1
- package/dist/plugins/web-tools/providers/native-fetch.js.map +1 -1
- package/dist/plugins/web-tools/providers/spider.d.ts +2 -2
- package/dist/plugins/web-tools/providers/spider.js +1 -1
- package/dist/plugins/web-tools/providers/spider.js.map +1 -1
- package/dist/plugins/web-tools/providers/zai.d.ts +2 -2
- package/dist/plugins/web-tools/providers/zai.js +1 -1
- package/dist/plugins/web-tools/providers/zai.js.map +1 -1
- package/dist/plugins/web-tools/schemas.d.ts +1 -1
- package/dist/plugins/web-tools/schemas.js +3 -3
- package/dist/plugins/web-tools/schemas.js.map +1 -1
- package/dist/plugins/web-tools/search-service.d.ts +81 -12
- package/dist/plugins/web-tools/search-service.js +104 -57
- package/dist/plugins/web-tools/search-service.js.map +1 -1
- package/dist/plugins/workflow/authorization.d.ts +44 -10
- package/dist/plugins/workflow/authorization.js +113 -73
- package/dist/plugins/workflow/authorization.js.map +1 -1
- package/dist/plugins/workflow/cancellation.d.ts +86 -0
- package/dist/plugins/workflow/cancellation.js +202 -0
- package/dist/plugins/workflow/cancellation.js.map +1 -0
- package/dist/plugins/workflow/checkpoints.d.ts +7 -1
- package/dist/plugins/workflow/checkpoints.js +141 -21
- package/dist/plugins/workflow/checkpoints.js.map +1 -1
- package/dist/plugins/workflow/delegated.d.ts +14 -0
- package/dist/plugins/workflow/delegated.js +6 -5
- package/dist/plugins/workflow/delegated.js.map +1 -1
- package/dist/plugins/workflow/host.d.ts +81 -0
- package/dist/plugins/workflow/host.js +189 -0
- package/dist/plugins/workflow/host.js.map +1 -0
- package/dist/plugins/workflow/index.d.ts +69 -4
- package/dist/plugins/workflow/index.js +1391 -1026
- package/dist/plugins/workflow/index.js.map +1 -1
- package/dist/plugins/workflow/recovery.d.ts +3 -5
- package/dist/plugins/workflow/recovery.js +18 -33
- package/dist/plugins/workflow/recovery.js.map +1 -1
- package/dist/plugins/workflow/repair.d.ts +31 -5
- package/dist/plugins/workflow/repair.js +116 -48
- package/dist/plugins/workflow/repair.js.map +1 -1
- package/dist/plugins/workflow/results.d.ts +31 -31
- package/dist/plugins/workflow/results.js +4 -4
- package/dist/plugins/workflow/results.js.map +1 -1
- package/dist/plugins/workflow/schemas.d.ts +3 -3
- package/dist/plugins/workflow/schemas.js +5 -5
- package/dist/plugins/workflow/schemas.js.map +1 -1
- package/dist/plugins/workflow/system-instruction.md +4 -0
- package/dist/plugins/workflow/tooling.d.ts +6 -0
- package/dist/plugins/workflow/tooling.js +3 -1
- package/dist/plugins/workflow/tooling.js.map +1 -1
- package/dist/runtime/auxiliary.d.ts +13 -0
- package/dist/runtime/auxiliary.js +108 -0
- package/dist/runtime/auxiliary.js.map +1 -0
- package/dist/runtime/client.d.ts +88 -0
- package/dist/runtime/client.js +174 -0
- package/dist/runtime/client.js.map +1 -0
- package/dist/runtime/context-inspection-contract.d.ts +397 -0
- package/dist/runtime/context-inspection-contract.js +622 -0
- package/dist/runtime/context-inspection-contract.js.map +1 -0
- package/dist/runtime/context-inspection.d.ts +52 -0
- package/dist/runtime/context-inspection.js +324 -0
- package/dist/runtime/context-inspection.js.map +1 -0
- package/dist/runtime/context.d.ts +192 -0
- package/dist/runtime/context.js +1246 -0
- package/dist/runtime/context.js.map +1 -0
- package/dist/runtime/coordination.d.ts +40 -0
- package/dist/runtime/coordination.js +87 -0
- package/dist/runtime/coordination.js.map +1 -0
- package/dist/runtime/model-registry.d.ts +34 -0
- package/dist/runtime/model-registry.js +227 -0
- package/dist/runtime/model-registry.js.map +1 -0
- package/dist/runtime/permissions.d.ts +20 -0
- package/dist/runtime/permissions.js +250 -0
- package/dist/runtime/permissions.js.map +1 -0
- package/dist/runtime/snapshot-config.d.ts +80 -0
- package/dist/runtime/snapshot-config.js +268 -0
- package/dist/runtime/snapshot-config.js.map +1 -0
- package/dist/runtime/snapshot-store.d.ts +25 -0
- package/dist/runtime/snapshot-store.js +519 -0
- package/dist/runtime/snapshot-store.js.map +1 -0
- package/dist/runtime/snapshots.d.ts +59 -0
- package/dist/runtime/snapshots.js +721 -0
- package/dist/runtime/snapshots.js.map +1 -0
- package/dist/runtime/types.d.ts +713 -0
- package/dist/runtime/types.js +190 -0
- package/dist/runtime/types.js.map +1 -0
- package/dist/tui/analytics/indicator.d.ts +25 -26
- package/dist/tui/analytics/indicator.js +66 -74
- package/dist/tui/analytics/indicator.js.map +1 -1
- package/dist/tui/branding/footer.d.ts +7 -12
- package/dist/tui/branding/footer.js +16 -24
- package/dist/tui/branding/footer.js.map +1 -1
- package/dist/tui/context/analyze.d.ts +20 -9
- package/dist/tui/context/analyze.js +295 -257
- package/dist/tui/context/analyze.js.map +1 -1
- package/dist/tui/context/collect.d.ts +29 -3
- package/dist/tui/context/collect.js +450 -66
- package/dist/tui/context/collect.js.map +1 -1
- package/dist/tui/context/plugin.d.ts +21 -7
- package/dist/tui/context/plugin.js +65 -70
- package/dist/tui/context/plugin.js.map +1 -1
- package/dist/tui/context/types.d.ts +174 -43
- package/dist/tui/context/types.js +25 -19
- package/dist/tui/context/types.js.map +1 -1
- package/dist/tui/context/view.d.ts +33 -7
- package/dist/tui/context/view.js +136 -81
- package/dist/tui/context/view.js.map +1 -1
- package/dist/tui/peak-hours/banner.d.ts +13 -11
- package/dist/tui/peak-hours/banner.js +48 -80
- package/dist/tui/peak-hours/banner.js.map +1 -1
- package/dist/tui/policy.d.ts +69 -0
- package/dist/tui/policy.js +169 -0
- package/dist/tui/policy.js.map +1 -0
- package/dist/tui.d.ts +3 -8
- package/dist/tui.js +72 -68
- package/dist/tui.js.map +1 -1
- package/package.json +19 -15
- package/schemas/vvoc/v3.json +1 -1
- package/server.js +3 -5
- package/templates/agents/enhancer.md +10 -5
- package/templates/agents/guardian.md +10 -4
- package/templates/agents/investigator.md +4 -2
- package/templates/agents/vv-code-reviewer.md +4 -2
- package/templates/agents/vv-spec-reviewer.md +4 -2
- package/templates/skills/vv-execute/references/tool-contracts.md +1 -1
- package/tui.js +3 -5
- package/dist/plugins/analytics/v2.d.ts +0 -21
- package/dist/plugins/analytics/v2.js +0 -133
- package/dist/plugins/analytics/v2.js.map +0 -1
- package/dist/plugins/guardian/v2.d.ts +0 -13
- package/dist/plugins/guardian/v2.js +0 -204
- package/dist/plugins/guardian/v2.js.map +0 -1
- package/dist/plugins/hashline-edit/v2.d.ts +0 -12
- package/dist/plugins/hashline-edit/v2.js +0 -145
- package/dist/plugins/hashline-edit/v2.js.map +0 -1
- package/dist/plugins/model-roles/v2.d.ts +0 -24
- package/dist/plugins/model-roles/v2.js +0 -274
- package/dist/plugins/model-roles/v2.js.map +0 -1
- package/dist/plugins/peak-hours/v2.d.ts +0 -12
- package/dist/plugins/peak-hours/v2.js +0 -99
- package/dist/plugins/peak-hours/v2.js.map +0 -1
- package/dist/plugins/secrets-redaction/v2.d.ts +0 -19
- package/dist/plugins/secrets-redaction/v2.js +0 -138
- package/dist/plugins/secrets-redaction/v2.js.map +0 -1
- package/dist/plugins/spec-guard/v2.d.ts +0 -12
- package/dist/plugins/spec-guard/v2.js +0 -139
- package/dist/plugins/spec-guard/v2.js.map +0 -1
- package/dist/plugins/system-context-injection/agent-contexts.d.ts +0 -5
- package/dist/plugins/system-context-injection/agent-contexts.js +0 -164
- package/dist/plugins/system-context-injection/agent-contexts.js.map +0 -1
- package/dist/plugins/system-context-injection/v2.d.ts +0 -13
- package/dist/plugins/system-context-injection/v2.js +0 -60
- package/dist/plugins/system-context-injection/v2.js.map +0 -1
- package/dist/plugins/tool-history-compaction/v2.d.ts +0 -11
- package/dist/plugins/tool-history-compaction/v2.js +0 -56
- package/dist/plugins/tool-history-compaction/v2.js.map +0 -1
- package/dist/plugins/v2-runtime/config-watcher.d.ts +0 -26
- package/dist/plugins/v2-runtime/config-watcher.js +0 -111
- package/dist/plugins/v2-runtime/config-watcher.js.map +0 -1
- package/dist/plugins/v2-runtime/index.d.ts +0 -50
- package/dist/plugins/v2-runtime/index.js +0 -114
- package/dist/plugins/v2-runtime/index.js.map +0 -1
- package/dist/plugins/v2-runtime/location-config.d.ts +0 -51
- package/dist/plugins/v2-runtime/location-config.js +0 -91
- package/dist/plugins/v2-runtime/location-config.js.map +0 -1
- package/dist/plugins/v2-runtime/setup.d.ts +0 -48
- package/dist/plugins/v2-runtime/setup.js +0 -174
- package/dist/plugins/v2-runtime/setup.js.map +0 -1
- package/dist/plugins/web-tools/v2.d.ts +0 -11
- package/dist/plugins/web-tools/v2.js +0 -99
- package/dist/plugins/web-tools/v2.js.map +0 -1
- package/dist/plugins/workflow/v2.d.ts +0 -76
- package/dist/plugins/workflow/v2.js +0 -283
- package/dist/plugins/workflow/v2.js.map +0 -1
|
@@ -0,0 +1,397 @@
|
|
|
1
|
+
import { type PeakHoursMode } from "../lib/peak-hours.js";
|
|
2
|
+
/** Stable versioned RPC id. */
|
|
3
|
+
export declare const CONTEXT_INSPECTION_RPC_ID: "vvoc.context-inspection.v1";
|
|
4
|
+
/** DTO schema version required in every reply. */
|
|
5
|
+
export declare const CONTEXT_INSPECTION_VERSION: 1;
|
|
6
|
+
/** Registered method name. */
|
|
7
|
+
export declare const CONTEXT_INSPECTION_METHOD: "inspect";
|
|
8
|
+
/** Stable value-free error codes surfaced through the policy/RPC contract. */
|
|
9
|
+
export type ContextInspectionErrorCode = "tool_catalog_unavailable" | "session_lookup_failed" | "session_location_mismatch" | "policy_capture_missing" | "policy_capture_invalid" | "policy_lookup_failed" | "current_config_unavailable" | "schedule_projection_exceeded" | "inspection_internal_error";
|
|
10
|
+
/** Explicit complete/partial/unavailable observation status. */
|
|
11
|
+
export type ContextInspectionStatus = "complete" | "partial" | "unavailable";
|
|
12
|
+
/** Serving location/project identity exposed to the client. */
|
|
13
|
+
export interface ContextInspectionLocation {
|
|
14
|
+
readonly directory: string;
|
|
15
|
+
readonly projectID?: string;
|
|
16
|
+
readonly workspaceID?: string;
|
|
17
|
+
}
|
|
18
|
+
/** One registered tool row with effective id, safe namespace, code-mode flag, and schema availability. */
|
|
19
|
+
export interface ContextInspectionTool {
|
|
20
|
+
readonly effectiveID: string;
|
|
21
|
+
readonly name: string;
|
|
22
|
+
readonly description?: string;
|
|
23
|
+
readonly namespace?: string;
|
|
24
|
+
readonly codeMode: boolean;
|
|
25
|
+
readonly inputJSONSchema?: unknown;
|
|
26
|
+
readonly status: "registered" | "unavailable";
|
|
27
|
+
}
|
|
28
|
+
/** Tool catalog plus its own verdict and warnings. */
|
|
29
|
+
export interface ContextInspectionCatalog {
|
|
30
|
+
readonly status: ContextInspectionStatus;
|
|
31
|
+
readonly tools: readonly ContextInspectionTool[];
|
|
32
|
+
readonly warnings: readonly string[];
|
|
33
|
+
}
|
|
34
|
+
/** Allowlisted peak window. */
|
|
35
|
+
export interface ContextInspectionPeakWindow {
|
|
36
|
+
readonly start: string;
|
|
37
|
+
readonly end: string;
|
|
38
|
+
readonly tz?: string;
|
|
39
|
+
readonly days?: readonly number[];
|
|
40
|
+
}
|
|
41
|
+
/** Allowlisted per-provider peak schedule including its mode. */
|
|
42
|
+
export interface ContextInspectionPeakSchedule {
|
|
43
|
+
readonly mode?: PeakHoursMode;
|
|
44
|
+
readonly windows: readonly ContextInspectionPeakWindow[];
|
|
45
|
+
}
|
|
46
|
+
/** Allowlisted peak-hours policy projection. */
|
|
47
|
+
export interface ContextInspectionPeakHours {
|
|
48
|
+
readonly enabled: boolean;
|
|
49
|
+
readonly mode: PeakHoursMode;
|
|
50
|
+
readonly graceActiveSessions: boolean;
|
|
51
|
+
readonly schedules: Readonly<Record<string, ContextInspectionPeakSchedule>>;
|
|
52
|
+
}
|
|
53
|
+
/** Capture provenance ids/times for the family-scoped policy. */
|
|
54
|
+
export interface ContextInspectionProvenance {
|
|
55
|
+
readonly familyId: string;
|
|
56
|
+
readonly snapshotId: string;
|
|
57
|
+
readonly capturedAt: number;
|
|
58
|
+
readonly location: ContextInspectionLocation;
|
|
59
|
+
}
|
|
60
|
+
/** Allowlisted policy projection (family capture or current-runtime preview) or a value-free unavailable verdict. */
|
|
61
|
+
export type ContextInspectionPolicy = {
|
|
62
|
+
readonly status: "available";
|
|
63
|
+
readonly scope: "family";
|
|
64
|
+
readonly contextEnabled: boolean;
|
|
65
|
+
readonly analyticsEnabled: boolean;
|
|
66
|
+
readonly peakHours: ContextInspectionPeakHours;
|
|
67
|
+
readonly provenance: ContextInspectionProvenance;
|
|
68
|
+
readonly warnings?: readonly string[];
|
|
69
|
+
} | {
|
|
70
|
+
readonly status: "preview";
|
|
71
|
+
readonly scope: "current-runtime";
|
|
72
|
+
readonly contextEnabled: boolean;
|
|
73
|
+
readonly analyticsEnabled: boolean;
|
|
74
|
+
readonly peakHours: ContextInspectionPeakHours;
|
|
75
|
+
readonly warnings?: readonly string[];
|
|
76
|
+
} | {
|
|
77
|
+
readonly status: "unavailable";
|
|
78
|
+
readonly scope: "family" | "current-runtime";
|
|
79
|
+
readonly error: ContextInspectionErrorCode;
|
|
80
|
+
};
|
|
81
|
+
/** RPC input. */
|
|
82
|
+
export interface ContextInspectionInput {
|
|
83
|
+
readonly sessionID?: string;
|
|
84
|
+
readonly includeCatalog?: boolean;
|
|
85
|
+
}
|
|
86
|
+
/** Versioned bounded RPC output. */
|
|
87
|
+
export interface ContextInspectionResult {
|
|
88
|
+
readonly version: typeof CONTEXT_INSPECTION_VERSION;
|
|
89
|
+
readonly status: ContextInspectionStatus;
|
|
90
|
+
readonly location: ContextInspectionLocation;
|
|
91
|
+
readonly observedAt: number;
|
|
92
|
+
readonly catalog?: ContextInspectionCatalog;
|
|
93
|
+
readonly policy?: ContextInspectionPolicy;
|
|
94
|
+
readonly warnings: readonly string[];
|
|
95
|
+
}
|
|
96
|
+
/** Portable RPC definition registered server-side and called client-side. */
|
|
97
|
+
export declare const contextInspectionRpc: {
|
|
98
|
+
id: "vvoc.context-inspection.v1";
|
|
99
|
+
methods: {
|
|
100
|
+
inspect: {
|
|
101
|
+
input: {
|
|
102
|
+
readonly type: "object";
|
|
103
|
+
readonly additionalProperties: false;
|
|
104
|
+
readonly properties: {
|
|
105
|
+
readonly sessionID: {
|
|
106
|
+
readonly type: "string";
|
|
107
|
+
readonly maxLength: 160;
|
|
108
|
+
};
|
|
109
|
+
readonly includeCatalog: {
|
|
110
|
+
readonly type: "boolean";
|
|
111
|
+
};
|
|
112
|
+
};
|
|
113
|
+
};
|
|
114
|
+
output: {
|
|
115
|
+
readonly type: "object";
|
|
116
|
+
readonly additionalProperties: false;
|
|
117
|
+
readonly required: readonly ["version", "status", "location", "observedAt", "warnings"];
|
|
118
|
+
readonly properties: {
|
|
119
|
+
readonly version: {
|
|
120
|
+
readonly type: "number";
|
|
121
|
+
readonly enum: readonly [1];
|
|
122
|
+
};
|
|
123
|
+
readonly status: {
|
|
124
|
+
readonly type: "string";
|
|
125
|
+
readonly enum: readonly ["complete", "partial", "unavailable"];
|
|
126
|
+
};
|
|
127
|
+
readonly location: {
|
|
128
|
+
readonly type: "object";
|
|
129
|
+
readonly additionalProperties: false;
|
|
130
|
+
readonly required: readonly ["directory"];
|
|
131
|
+
readonly properties: {
|
|
132
|
+
readonly directory: {
|
|
133
|
+
readonly type: "string";
|
|
134
|
+
readonly maxLength: 4096;
|
|
135
|
+
};
|
|
136
|
+
readonly projectID: {
|
|
137
|
+
readonly type: "string";
|
|
138
|
+
readonly maxLength: 160;
|
|
139
|
+
};
|
|
140
|
+
readonly workspaceID: {
|
|
141
|
+
readonly type: "string";
|
|
142
|
+
readonly maxLength: 160;
|
|
143
|
+
};
|
|
144
|
+
};
|
|
145
|
+
};
|
|
146
|
+
readonly observedAt: {
|
|
147
|
+
readonly type: "number";
|
|
148
|
+
};
|
|
149
|
+
readonly catalog: {
|
|
150
|
+
readonly type: "object";
|
|
151
|
+
readonly additionalProperties: false;
|
|
152
|
+
readonly required: readonly ["status", "tools", "warnings"];
|
|
153
|
+
readonly properties: {
|
|
154
|
+
readonly status: {
|
|
155
|
+
readonly type: "string";
|
|
156
|
+
readonly enum: readonly ["complete", "partial", "unavailable"];
|
|
157
|
+
};
|
|
158
|
+
readonly tools: {
|
|
159
|
+
readonly type: "array";
|
|
160
|
+
readonly maxItems: 512;
|
|
161
|
+
readonly items: {
|
|
162
|
+
readonly type: "object";
|
|
163
|
+
readonly additionalProperties: false;
|
|
164
|
+
readonly required: readonly ["effectiveID", "name", "codeMode", "status"];
|
|
165
|
+
readonly properties: {
|
|
166
|
+
readonly effectiveID: {
|
|
167
|
+
readonly type: "string";
|
|
168
|
+
readonly maxLength: 160;
|
|
169
|
+
};
|
|
170
|
+
readonly name: {
|
|
171
|
+
readonly type: "string";
|
|
172
|
+
readonly maxLength: 160;
|
|
173
|
+
};
|
|
174
|
+
readonly description: {
|
|
175
|
+
readonly type: "string";
|
|
176
|
+
readonly maxLength: 400;
|
|
177
|
+
};
|
|
178
|
+
readonly namespace: {
|
|
179
|
+
readonly type: "string";
|
|
180
|
+
readonly maxLength: 96;
|
|
181
|
+
};
|
|
182
|
+
readonly codeMode: {
|
|
183
|
+
readonly type: "boolean";
|
|
184
|
+
};
|
|
185
|
+
readonly inputJSONSchema: {
|
|
186
|
+
readonly type: readonly ["object", "boolean"];
|
|
187
|
+
};
|
|
188
|
+
readonly status: {
|
|
189
|
+
readonly type: "string";
|
|
190
|
+
readonly enum: readonly ["registered", "unavailable"];
|
|
191
|
+
};
|
|
192
|
+
};
|
|
193
|
+
};
|
|
194
|
+
};
|
|
195
|
+
readonly warnings: {
|
|
196
|
+
readonly type: "array";
|
|
197
|
+
readonly maxItems: 8;
|
|
198
|
+
readonly items: {
|
|
199
|
+
readonly type: "string";
|
|
200
|
+
readonly maxLength: 400;
|
|
201
|
+
};
|
|
202
|
+
};
|
|
203
|
+
};
|
|
204
|
+
};
|
|
205
|
+
readonly policy: {
|
|
206
|
+
readonly type: "object";
|
|
207
|
+
readonly required: readonly ["status", "scope"];
|
|
208
|
+
readonly additionalProperties: false;
|
|
209
|
+
readonly properties: {
|
|
210
|
+
readonly status: {
|
|
211
|
+
readonly type: "string";
|
|
212
|
+
readonly enum: readonly ["available", "preview", "unavailable"];
|
|
213
|
+
};
|
|
214
|
+
readonly scope: {
|
|
215
|
+
readonly type: "string";
|
|
216
|
+
readonly enum: readonly ["family", "current-runtime"];
|
|
217
|
+
};
|
|
218
|
+
readonly contextEnabled: {
|
|
219
|
+
readonly type: "boolean";
|
|
220
|
+
};
|
|
221
|
+
readonly analyticsEnabled: {
|
|
222
|
+
readonly type: "boolean";
|
|
223
|
+
};
|
|
224
|
+
readonly peakHours: {
|
|
225
|
+
readonly type: "object";
|
|
226
|
+
readonly additionalProperties: false;
|
|
227
|
+
readonly required: readonly ["enabled", "mode", "graceActiveSessions", "schedules"];
|
|
228
|
+
readonly properties: {
|
|
229
|
+
readonly enabled: {
|
|
230
|
+
readonly type: "boolean";
|
|
231
|
+
};
|
|
232
|
+
readonly mode: {
|
|
233
|
+
readonly type: "string";
|
|
234
|
+
readonly enum: readonly ["soft", "hard"];
|
|
235
|
+
};
|
|
236
|
+
readonly graceActiveSessions: {
|
|
237
|
+
readonly type: "boolean";
|
|
238
|
+
};
|
|
239
|
+
readonly schedules: {
|
|
240
|
+
readonly type: "object";
|
|
241
|
+
readonly additionalProperties: {
|
|
242
|
+
readonly type: "object";
|
|
243
|
+
readonly additionalProperties: false;
|
|
244
|
+
readonly required: readonly ["windows"];
|
|
245
|
+
readonly properties: {
|
|
246
|
+
readonly mode: {
|
|
247
|
+
readonly type: "string";
|
|
248
|
+
readonly enum: readonly ["soft", "hard"];
|
|
249
|
+
};
|
|
250
|
+
readonly windows: {
|
|
251
|
+
readonly type: "array";
|
|
252
|
+
readonly maxItems: 64;
|
|
253
|
+
readonly items: {
|
|
254
|
+
readonly type: "object";
|
|
255
|
+
readonly additionalProperties: false;
|
|
256
|
+
readonly required: readonly ["start", "end"];
|
|
257
|
+
readonly properties: {
|
|
258
|
+
readonly start: {
|
|
259
|
+
readonly type: "string";
|
|
260
|
+
readonly maxLength: 16;
|
|
261
|
+
};
|
|
262
|
+
readonly end: {
|
|
263
|
+
readonly type: "string";
|
|
264
|
+
readonly maxLength: 16;
|
|
265
|
+
};
|
|
266
|
+
readonly tz: {
|
|
267
|
+
readonly type: "string";
|
|
268
|
+
readonly maxLength: 64;
|
|
269
|
+
};
|
|
270
|
+
readonly days: {
|
|
271
|
+
readonly type: "array";
|
|
272
|
+
readonly maxItems: 7;
|
|
273
|
+
readonly items: {
|
|
274
|
+
readonly type: "number";
|
|
275
|
+
};
|
|
276
|
+
};
|
|
277
|
+
};
|
|
278
|
+
};
|
|
279
|
+
};
|
|
280
|
+
};
|
|
281
|
+
};
|
|
282
|
+
};
|
|
283
|
+
};
|
|
284
|
+
};
|
|
285
|
+
readonly provenance: {
|
|
286
|
+
readonly type: "object";
|
|
287
|
+
readonly additionalProperties: false;
|
|
288
|
+
readonly required: readonly ["familyId", "snapshotId", "capturedAt", "location"];
|
|
289
|
+
readonly properties: {
|
|
290
|
+
readonly familyId: {
|
|
291
|
+
readonly type: "string";
|
|
292
|
+
readonly maxLength: 160;
|
|
293
|
+
};
|
|
294
|
+
readonly snapshotId: {
|
|
295
|
+
readonly type: "string";
|
|
296
|
+
readonly maxLength: 160;
|
|
297
|
+
};
|
|
298
|
+
readonly capturedAt: {
|
|
299
|
+
readonly type: "number";
|
|
300
|
+
};
|
|
301
|
+
readonly location: {
|
|
302
|
+
readonly type: "object";
|
|
303
|
+
readonly additionalProperties: false;
|
|
304
|
+
readonly required: readonly ["directory"];
|
|
305
|
+
readonly properties: {
|
|
306
|
+
readonly directory: {
|
|
307
|
+
readonly type: "string";
|
|
308
|
+
readonly maxLength: 4096;
|
|
309
|
+
};
|
|
310
|
+
readonly projectID: {
|
|
311
|
+
readonly type: "string";
|
|
312
|
+
readonly maxLength: 160;
|
|
313
|
+
};
|
|
314
|
+
readonly workspaceID: {
|
|
315
|
+
readonly type: "string";
|
|
316
|
+
readonly maxLength: 160;
|
|
317
|
+
};
|
|
318
|
+
};
|
|
319
|
+
};
|
|
320
|
+
};
|
|
321
|
+
};
|
|
322
|
+
readonly warnings: {
|
|
323
|
+
readonly type: "array";
|
|
324
|
+
readonly maxItems: 8;
|
|
325
|
+
readonly items: {
|
|
326
|
+
readonly type: "string";
|
|
327
|
+
readonly maxLength: 400;
|
|
328
|
+
};
|
|
329
|
+
};
|
|
330
|
+
readonly error: {
|
|
331
|
+
readonly type: "string";
|
|
332
|
+
readonly maxLength: 64;
|
|
333
|
+
};
|
|
334
|
+
};
|
|
335
|
+
};
|
|
336
|
+
readonly warnings: {
|
|
337
|
+
readonly type: "array";
|
|
338
|
+
readonly maxItems: 8;
|
|
339
|
+
readonly items: {
|
|
340
|
+
readonly type: "string";
|
|
341
|
+
readonly maxLength: 400;
|
|
342
|
+
};
|
|
343
|
+
};
|
|
344
|
+
};
|
|
345
|
+
};
|
|
346
|
+
};
|
|
347
|
+
};
|
|
348
|
+
events: {};
|
|
349
|
+
};
|
|
350
|
+
/** Structural vvoc toggle source accepted by the pure policy projection. */
|
|
351
|
+
export interface ContextInspectionPolicySource {
|
|
352
|
+
readonly plugins?: Readonly<Record<string, unknown>> | undefined;
|
|
353
|
+
}
|
|
354
|
+
/** Projected values derived from the allowlisted policy source. */
|
|
355
|
+
export interface ProjectedContextInspectionPolicy {
|
|
356
|
+
readonly contextEnabled: boolean;
|
|
357
|
+
readonly analyticsEnabled: boolean;
|
|
358
|
+
readonly peakHours: ContextInspectionPeakHours;
|
|
359
|
+
/** False when a schedule exceeded the bounded projection and was not fully preserved. */
|
|
360
|
+
readonly complete: boolean;
|
|
361
|
+
readonly warnings: readonly string[];
|
|
362
|
+
}
|
|
363
|
+
/**
|
|
364
|
+
* Allowlisted policy projection from plugin toggles. Only context/analytics
|
|
365
|
+
* enablement and the peak-hours enabled/mode/grace/schedules fields survive;
|
|
366
|
+
* every other captured setting (models, web keys, MCP config, headers, bodies,
|
|
367
|
+
* secrets) is intentionally dropped.
|
|
368
|
+
*/
|
|
369
|
+
export declare function projectContextInspectionPolicy(source: ContextInspectionPolicySource | undefined): ProjectedContextInspectionPolicy;
|
|
370
|
+
/** Server-injectable vendor schema-to-JSON-Schema converter (e.g. Effect codecs). */
|
|
371
|
+
export type ContextInspectionSchemaConverter = (schema: unknown) => unknown;
|
|
372
|
+
/** One projected tool row plus any bounded warnings it produced. */
|
|
373
|
+
export interface ProjectedContextInspectionTool {
|
|
374
|
+
readonly tool: ContextInspectionTool;
|
|
375
|
+
readonly warnings: readonly string[];
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* Safe projection of one native tool row. `input` is converted to JSON Schema
|
|
379
|
+
* only when it is a plain JSON Schema object, exposes a Standard JSON Schema
|
|
380
|
+
* converter, or is handled by the server-injected vendor converter. A Standard
|
|
381
|
+
* Schema object is never re-interpreted as a plain JSON Schema, an unsupported
|
|
382
|
+
* vendor yields `unavailable` (never `{}`), and an oversized schema is refused
|
|
383
|
+
* rather than truncated.
|
|
384
|
+
*/
|
|
385
|
+
export declare function projectContextInspectionTool(row: unknown, convertVendorSchema?: ContextInspectionSchemaConverter): ProjectedContextInspectionTool | undefined;
|
|
386
|
+
/**
|
|
387
|
+
* Strict versioned output decoder. Malformed or spoofed replies cannot become
|
|
388
|
+
* UI policy: every required field, type, enum, and scope/provenance combination
|
|
389
|
+
* is enforced here before the client trusts a reply.
|
|
390
|
+
*/
|
|
391
|
+
export declare function isContextInspectionResult(value: unknown): value is ContextInspectionResult;
|
|
392
|
+
/** Stable value-free error code for a failed inspection step. */
|
|
393
|
+
export declare function inspectionErrorCode(stage: "catalog" | "session" | "session-location" | "policy" | "preview" | "internal"): ContextInspectionErrorCode;
|
|
394
|
+
/** Bound a warning list so a broken registry cannot return an unbounded payload. */
|
|
395
|
+
export declare function boundedWarnings(warnings: readonly string[]): string[];
|
|
396
|
+
/** Exposed for focused tests of the row bound. */
|
|
397
|
+
export declare const CONTEXT_INSPECTION_MAX_TOOLS = 512;
|