@agentdock/wire 0.0.91 → 0.0.92
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/dist/features.d.ts +3 -1
- package/dist/features.js +1 -1
- package/package.json +2 -3
package/dist/features.d.ts
CHANGED
|
@@ -12,6 +12,8 @@ export interface FeatureDefinition {
|
|
|
12
12
|
readonly requiredMethods: readonly string[];
|
|
13
13
|
/** Version where this feature was first introduced. */
|
|
14
14
|
readonly sinceVersion: string;
|
|
15
|
+
/** How a machine's availability should be determined. Defaults to registered RPC methods. */
|
|
16
|
+
readonly availability?: 'methods' | 'daemon-version';
|
|
15
17
|
/** Edition(s) this feature applies to. Undefined = both editions. */
|
|
16
18
|
readonly edition?: 'personal' | 'enterprise';
|
|
17
19
|
/** Sub-features gated by daemon version within this parent feature. */
|
|
@@ -26,7 +28,7 @@ export declare const FEATURE_REGISTRY: readonly FeatureDefinition[];
|
|
|
26
28
|
* Check whether a specific feature is available given the set of supported methods.
|
|
27
29
|
* A feature is available when ALL its required methods are present.
|
|
28
30
|
*/
|
|
29
|
-
export declare function isFeatureAvailable(featureId: string, supportedMethods: readonly string[]): boolean;
|
|
31
|
+
export declare function isFeatureAvailable(featureId: string, supportedMethods: readonly string[], daemonVersion?: string): boolean;
|
|
30
32
|
/**
|
|
31
33
|
* Check whether a sub-feature is available given supported methods and daemon version.
|
|
32
34
|
* Requires the parent feature to be available AND the daemon version to satisfy the sub-feature minimum.
|
package/dist/features.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";import{satisfiesMin as
|
|
1
|
+
"use strict";import{satisfiesMin as a}from"./semver.js";export const FEATURE_REGISTRY=[{id:"agent-settings",requiredMethods:["get-agent-settings","set-agent-settings"],sinceVersion:"0.0.4",subFeatures:[{id:"startup-scripts",sinceVersion:"0.0.30"}]},{id:"labs-settings",requiredMethods:["get-labs-settings","set-labs-settings"],sinceVersion:"0.0.12"},{id:"history-sync",requiredMethods:["backfill-history-session"],sinceVersion:"0.0.12"},{id:"check-path",requiredMethods:["check-path"],sinceVersion:"0.0.7"},{id:"remote-upgrade",requiredMethods:["trigger-upgrade"],sinceVersion:"0.0.30"},{id:"checkpoint",requiredMethods:["checkpoint-list","checkpoint-diff","checkpoint-rollback"],sinceVersion:"0.0.30",subFeatures:[{id:"conversation-rollback",sinceVersion:"0.0.32"}]},{id:"scheduled-tasks",requiredMethods:["spawn-session"],sinceVersion:"0.0.35"},{id:"auto-upgrade-daemon",requiredMethods:["set-auto-upgrade-daemon"],sinceVersion:"0.0.31"},{id:"file-upload",requiredMethods:["file-relay-receive"],sinceVersion:"0.0.36",edition:"personal"},{id:"context-usage",requiredMethods:["get-context-usage"],sinceVersion:"0.0.91",availability:"daemon-version"}];export function isFeatureAvailable(o,t,r){const e=FEATURE_REGISTRY.find(n=>n.id===o);if(!e)return!1;if(e.availability==="daemon-version")return r!=null&&a(r,e.sinceVersion);const i=new Set(t);return e.requiredMethods.every(n=>i.has(n))}export function isSubFeatureAvailable(o,t,r,e){const i=FEATURE_REGISTRY.find(s=>s.id===o);if(!i||!isFeatureAvailable(o,r))return!1;const n=i.subFeatures?.find(s=>s.id===t);if(!n||!e||!a(e,n.sinceVersion))return!1;if(n.requiredMethods){const s=new Set(r);return n.requiredMethods.every(d=>s.has(d))}return!0}export function getSubFeatureMinVersion(o,t){return FEATURE_REGISTRY.find(e=>e.id===o)?.subFeatures?.find(e=>e.id===t)?.sinceVersion}export function getUnavailableFeatures(o,t){const r=[],e=new Set(o);for(const i of FEATURE_REGISTRY)if(!(i.availability==="daemon-version"?t!=null&&a(t,i.sinceVersion):i.requiredMethods.every(s=>e.has(s))))r.push({id:i.id,sinceVersion:i.sinceVersion});else if(i.subFeatures&&t)for(const s of i.subFeatures){const d=!a(t,s.sinceVersion),u=s.requiredMethods!=null&&!s.requiredMethods.every(c=>e.has(c));(d||u)&&r.push({id:`${i.id}/${s.id}`,sinceVersion:s.sinceVersion})}return r}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentdock/wire",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.92",
|
|
4
4
|
"description": "Protocol definitions for AgentDock — Zod schemas, message formats, RPC types",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"author": "CCPark",
|
|
@@ -18,8 +18,7 @@
|
|
|
18
18
|
"dist"
|
|
19
19
|
],
|
|
20
20
|
"publishConfig": {
|
|
21
|
-
"access": "public"
|
|
22
|
-
"registry": "https://registry.npmjs.org"
|
|
21
|
+
"access": "public"
|
|
23
22
|
},
|
|
24
23
|
"dependencies": {
|
|
25
24
|
"@paralleldrive/cuid2": "^3.3.0",
|