@native-marketing/sdk 0.1.1 → 0.3.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/README.md +30 -3
- package/dist/index.js +1387 -1025
- package/package.json +1 -1
- package/release.json +3 -3
- package/types/contracts/agent/capabilities.d.ts +59 -0
- package/types/contracts/agent/index.d.ts +4 -0
- package/types/contracts/agent/input-repair.d.ts +32 -0
- package/types/contracts/agent/knowledge-reads.d.ts +1 -1
- package/types/contracts/agent/publication-preflight.d.ts +6 -0
- package/types/contracts/agent/test-records.d.ts +28 -0
- package/types/contracts/agent/validation.d.ts +7 -0
- package/types/contracts/event-backlog.d.ts +47 -0
- package/types/contracts/event-delivery.d.ts +124 -0
- package/types/contracts/event-exchange-browser.d.ts +39 -0
- package/types/contracts/event-exchange.d.ts +110 -0
- package/types/contracts/index.d.ts +7 -0
- package/types/contracts/knowledge-discovery.d.ts +185 -0
- package/types/contracts/knowledge-rich-document.d.ts +238 -1
- package/types/contracts/marketing-domain-events.d.ts +425 -0
- package/types/contracts/native-event-data.d.ts +8 -0
- package/types/contracts/provider-settings.d.ts +3 -0
- package/types/http/generated/schema.d.ts +2132 -1046
- package/types/sdk/agent-capabilities.d.ts +3 -0
- package/types/sdk/capability-definition.d.ts +24 -0
- package/types/sdk/client.d.ts +3 -2
- package/types/sdk/index.d.ts +2 -1
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { Client } from '@modelcontextprotocol/client';
|
|
2
|
+
import { type CapabilityQuery, type AgentCapabilityPage } from '../contracts/index.js';
|
|
3
|
+
export declare function findAgentCapabilities(client: Client, input?: Partial<CapabilityQuery>, timeout?: number): Promise<AgentCapabilityPage>;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type CapabilityDefinition } from '../contracts/index.js';
|
|
2
|
+
export declare function verifyCapabilityDefinition(raw: unknown, name: string, expectedHash?: string): CapabilityDefinition;
|
|
3
|
+
/** Per connection metadata only. A cache hit is never permission to execute. */
|
|
4
|
+
export declare class CapabilityDefinitionCache {
|
|
5
|
+
private readonly values;
|
|
6
|
+
remember(value: CapabilityDefinition): void;
|
|
7
|
+
get(name: string, hash: string): {
|
|
8
|
+
schemaVersion: 1;
|
|
9
|
+
schemaSha256: string;
|
|
10
|
+
definition: {
|
|
11
|
+
name: string;
|
|
12
|
+
title?: string | undefined;
|
|
13
|
+
description?: string | undefined;
|
|
14
|
+
inputSchema: Record<string, unknown>;
|
|
15
|
+
outputSchema?: Record<string, unknown> | undefined;
|
|
16
|
+
annotations?: Record<string, unknown> | undefined;
|
|
17
|
+
_meta?: Record<string, unknown> | undefined;
|
|
18
|
+
};
|
|
19
|
+
authority: {
|
|
20
|
+
discoveryIsAuthority: false;
|
|
21
|
+
callsReauthorize: true;
|
|
22
|
+
};
|
|
23
|
+
} | undefined;
|
|
24
|
+
}
|
package/types/sdk/client.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { readNativePackageFile } from './package-files.js';
|
|
2
2
|
import { readNativeProjectMediaFile } from './project-media.js';
|
|
3
3
|
import { uploadNativeProjectMedia, uploadNativeMaterial, type NativeMaterialUpload } from './material-upload.js';
|
|
4
|
-
import type { BusinessDocumentInput, AgentSummaryInput, AgentSummary, CapabilityCall, BusinessSearchQuery, BusinessSearchPage, BusinessContentPageRead, BusinessContentPage, CapabilityQuery, CapabilityPage, CapabilityDefinition, CapabilitySchemaRead, BusinessDocumentPage } from '../contracts/index.js';
|
|
4
|
+
import type { BusinessDocumentInput, AgentSummaryInput, AgentSummary, CapabilityCall, BusinessSearchQuery, BusinessSearchPage, BusinessContentPageRead, BusinessContentPage, CapabilityQuery, CapabilityPage, AgentCapabilityPage, CapabilityDefinition, CapabilitySchemaRead, BusinessDocumentPage } from '../contracts/index.js';
|
|
5
5
|
import { readNativeCapabilityDescriptor, readNativeCapabilitySchemaPage } from './schema-pages.js';
|
|
6
6
|
import { inspectNativeTool, listNativeToolsPage, type NativeToolOptions, type NativeToolResult } from './operations.js';
|
|
7
7
|
export interface NativeAgentClient {
|
|
@@ -24,7 +24,8 @@ export interface NativeAgentClient {
|
|
|
24
24
|
searchBusiness(input?: Partial<BusinessSearchQuery>): Promise<BusinessSearchPage>;
|
|
25
25
|
readBusinessPage(input: BusinessContentPageRead): Promise<BusinessContentPage>;
|
|
26
26
|
findCapabilities(input?: Partial<CapabilityQuery>): Promise<CapabilityPage>;
|
|
27
|
-
|
|
27
|
+
discoverCapabilities(input?: Partial<CapabilityQuery>): Promise<AgentCapabilityPage>;
|
|
28
|
+
describeCapability(name: string, expectedSchemaSha256?: string): Promise<CapabilityDefinition>;
|
|
28
29
|
}
|
|
29
30
|
export declare function withNativeAgentClient<T>(connection: {
|
|
30
31
|
resource: string;
|
package/types/sdk/index.d.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
export { withNativeAgentClient, type NativeAgentClient } from './client.js';
|
|
2
2
|
export { runNetworkCli } from './cli/run.js';
|
|
3
|
+
export { findAgentCapabilities } from './agent-capabilities.js';
|
|
3
4
|
export { findNativeCapabilities, describeNativeCapability } from './capabilities.js';
|
|
4
|
-
export type { CapabilityPage, CapabilityDefinition, CapabilityQuery, } from '../contracts/index.js';
|
|
5
|
+
export type { CapabilityPage, AgentCapabilityPage, CapabilityDefinition, CapabilityQuery, } from '../contracts/index.js';
|
|
5
6
|
export { CliError as NativeAgentClientError } from './errors.js';
|
|
6
7
|
export { searchNativeBusiness, readNativeBusinessPage } from './business-search.js';
|
|
7
8
|
export type { BusinessSearchQuery, BusinessSearchPage, BusinessContentPageRead, BusinessContentPage, } from '../contracts/index.js';
|