@zhin.js/agent-feature 1.1.1 → 1.1.3

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.
@@ -7,8 +7,11 @@ export interface AgentDescriptor extends AgentDefinition {
7
7
  }
8
8
  export declare class AgentIndex {
9
9
  #private;
10
+ readonly $projection: "zhin.agent-index/1";
10
11
  constructor(slots: readonly Readonly<CapabilitySlot<AgentDefinition>>[], snapshot: RuntimeSnapshot);
11
12
  list(): readonly AgentDescriptor[];
12
13
  visible(requester: PluginId): readonly AgentDescriptor[];
13
14
  get(requester: PluginId, name: string): AgentDescriptor | undefined;
14
15
  }
16
+ /** Recognize the versioned projection across generation module identities. */
17
+ export declare function isAgentIndex(value: unknown): value is AgentIndex;
@@ -1,5 +1,6 @@
1
1
  import { OwnerCapabilityIndex, } from '@zhin.js/feature-kit';
2
2
  export class AgentIndex {
3
+ $projection = 'zhin.agent-index/1';
3
4
  #index;
4
5
  constructor(slots, snapshot) {
5
6
  this.#index = new OwnerCapabilityIndex(slots, snapshot);
@@ -23,3 +24,8 @@ function toDescriptor(entry) {
23
24
  source: entry.source,
24
25
  });
25
26
  }
27
+ /** Recognize the versioned projection across generation module identities. */
28
+ export function isAgentIndex(value) {
29
+ return !!value && typeof value === 'object'
30
+ && value.$projection === 'zhin.agent-index/1';
31
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhin.js/agent-feature",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "description": "Convention-based Markdown Agent Feature for Zhin Plugin Runtime",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",
@@ -17,8 +17,8 @@
17
17
  "src"
18
18
  ],
19
19
  "dependencies": {
20
- "@zhin.js/feature-kit": "1.1.1",
21
- "@zhin.js/plugin-runtime": "1.1.10"
20
+ "@zhin.js/feature-kit": "1.1.2",
21
+ "@zhin.js/plugin-runtime": "1.1.11"
22
22
  },
23
23
  "devDependencies": {
24
24
  "@types/node": "^26.1.2",
@@ -12,6 +12,7 @@ export interface AgentDescriptor extends AgentDefinition {
12
12
  }
13
13
 
14
14
  export class AgentIndex {
15
+ readonly $projection = 'zhin.agent-index/1' as const;
15
16
  readonly #index: OwnerCapabilityIndex<AgentDefinition>;
16
17
 
17
18
  constructor(
@@ -43,3 +44,9 @@ function toDescriptor(entry: OwnerCapabilityEntry<AgentDefinition>): AgentDescri
43
44
  source: entry.source,
44
45
  });
45
46
  }
47
+
48
+ /** Recognize the versioned projection across generation module identities. */
49
+ export function isAgentIndex(value: unknown): value is AgentIndex {
50
+ return !!value && typeof value === 'object'
51
+ && (value as { readonly $projection?: unknown }).$projection === 'zhin.agent-index/1';
52
+ }