@covia/covia-sdk 1.7.3 → 1.7.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/dist/index.d.mts +14 -1
- package/dist/index.d.ts +14 -1
- package/dist/index.js +11 -1
- package/dist/index.mjs +11 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -367,6 +367,13 @@ declare class AgentManager {
|
|
|
367
367
|
* No polling required.
|
|
368
368
|
*/
|
|
369
369
|
chat(agentId: string, message: unknown, sessionId?: string): Promise<AgentChatResult>;
|
|
370
|
+
/**
|
|
371
|
+
* Set (or clear, by omitting `title` / passing an empty string) a
|
|
372
|
+
* session's free-form human-facing title — persisted on the venue in
|
|
373
|
+
* the session's own metadata, visible to every client and party in the
|
|
374
|
+
* session (not a per-browser local override).
|
|
375
|
+
*/
|
|
376
|
+
renameSession(agentId: string, sessionId: string, title?: string): Promise<AgentRenameSessionResult>;
|
|
370
377
|
trigger(agentId: string): Promise<AgentTriggerResult>;
|
|
371
378
|
/**
|
|
372
379
|
* List the caller's agents. **Job-free** on covia ≥ 0.4: goes through
|
|
@@ -1083,6 +1090,12 @@ interface AgentSuspendResult {
|
|
|
1083
1090
|
agentId: string;
|
|
1084
1091
|
status: string;
|
|
1085
1092
|
}
|
|
1093
|
+
interface AgentRenameSessionResult {
|
|
1094
|
+
agentId: string;
|
|
1095
|
+
sessionId: string;
|
|
1096
|
+
/** Absent when the title was cleared (an omitted/blank title on the call). */
|
|
1097
|
+
title?: string;
|
|
1098
|
+
}
|
|
1086
1099
|
interface AgentResumeInput {
|
|
1087
1100
|
agentId: string;
|
|
1088
1101
|
autoWake?: boolean;
|
|
@@ -1680,4 +1693,4 @@ declare function grant(ownerPrivateKey: Uint8Array, audienceDID: string, withRes
|
|
|
1680
1693
|
*/
|
|
1681
1694
|
declare function relayDelegation(privateKey: Uint8Array, venueDID: string, lifetimeSeconds: number, caps?: UCANCapability[]): string;
|
|
1682
1695
|
|
|
1683
|
-
export { type AdapterInfo, AdapterManager, type AdaptersResult, Agent, type AgentCancelTaskInput, type AgentCard, type AgentChatInput, type AgentChatResult, type AgentCompleteTaskResult, type AgentContextInput, type AgentCreateInput, type AgentCreateResult, type AgentDeleteInput, type AgentDeleteResult, type AgentFailTaskResult, type AgentForkInput, type AgentForkResult, type AgentInfoResult, type AgentListInput, type AgentListResult, AgentManager, type AgentMessageInput, type AgentMessageResult, type AgentRequestInput, type AgentRequestResult, type AgentResumeInput, AgentStatus, type AgentSuspendResult, type AgentTriggerInput, type AgentTriggerResult, type AgentUpdateInput, Asset, type AssetID, type AssetList, type AssetListOptions, AssetManager, type AssetMetadata, type AssetMetadataStore, AssetNotFoundError, type AssetPinResult, Auth, BasicAuth, BearerAuth, ChatSession, type ConnectionAttempt, type ContentDetails, type ContentHashResult, CoviaConnectionError, type CoviaConnectionErrorOptions, CoviaError, CoviaTimeoutError, type Credentials, CredentialsHTTP, type DIDDocument, type DIDURL, DataAsset, Ed25519Auth, type FunctionInfo, type FunctionsResult, Grid, GridError, type GroupCount, type InvokeOptions, type InvokePayload, Job, JobFailedError, JobManager, type JobMetadata, JobNotFoundError, JobStatus, KeyPairAuth, type MCPDiscovery, Namespace, NoAuth, NotFoundError, Operation, type OperationDetails, type OperationInfo, OperationManager, type OperationPayload, type OperationRunner, RateLimitError, RunStatus, type SSEEvent, type SecretExtractInput, type SecretExtractResult, SecretManager, type SecretSetInput, type SecretSetResult, type StatsData, type StatusData, type UCANAttenuation, type UCANCapability, type UCANIssueInput, type UCANIssueResult, UCANManager, type UCANVerifyResult, VENUE_RELAY, Venue, type VenueConstructor, type VenueData, VenueIdentityChangedError, type VenueInterface, type VenueOptions, type WorkspaceAggregateResult, type WorkspaceAppendInput, type WorkspaceAppendResult, type WorkspaceCopyResult, type WorkspaceCountResult, type WorkspaceDeleteInput, type WorkspaceDeleteResult, type WorkspaceInspectInput, type WorkspaceInspectResult, type WorkspaceListInput, type WorkspaceListResult, WorkspaceManager, type WorkspaceReadInput, type WorkspaceReadResult, type WorkspaceSliceInput, type WorkspaceSliceResult, type WorkspaceWriteInput, type WorkspaceWriteResult, assetHash, createSSEEvent, createUCANJWT, decodePublicKey, didFor, didFromPublicKey, didMethod, didUrl, encodePublicKey, fetchStreamWithError, fetchWithError, generateKeyPair, getAssetIdFromPath, getAssetIdFromVenueId, getAssetMetadataStore, getParsedAssetId, grant, hexToPrivateKey, identityToken, isDid, isJobComplete, isJobFinished, isJobPaused, logger, parseDidUrl, parseRetryAfterMs, parseSSEStream, privateKeyToHex, relayDelegation, retryDelayMs, setAssetMetadataStore, venueBaseUrlCandidates };
|
|
1696
|
+
export { type AdapterInfo, AdapterManager, type AdaptersResult, Agent, type AgentCancelTaskInput, type AgentCard, type AgentChatInput, type AgentChatResult, type AgentCompleteTaskResult, type AgentContextInput, type AgentCreateInput, type AgentCreateResult, type AgentDeleteInput, type AgentDeleteResult, type AgentFailTaskResult, type AgentForkInput, type AgentForkResult, type AgentInfoResult, type AgentListInput, type AgentListResult, AgentManager, type AgentMessageInput, type AgentMessageResult, type AgentRenameSessionResult, type AgentRequestInput, type AgentRequestResult, type AgentResumeInput, AgentStatus, type AgentSuspendResult, type AgentTriggerInput, type AgentTriggerResult, type AgentUpdateInput, Asset, type AssetID, type AssetList, type AssetListOptions, AssetManager, type AssetMetadata, type AssetMetadataStore, AssetNotFoundError, type AssetPinResult, Auth, BasicAuth, BearerAuth, ChatSession, type ConnectionAttempt, type ContentDetails, type ContentHashResult, CoviaConnectionError, type CoviaConnectionErrorOptions, CoviaError, CoviaTimeoutError, type Credentials, CredentialsHTTP, type DIDDocument, type DIDURL, DataAsset, Ed25519Auth, type FunctionInfo, type FunctionsResult, Grid, GridError, type GroupCount, type InvokeOptions, type InvokePayload, Job, JobFailedError, JobManager, type JobMetadata, JobNotFoundError, JobStatus, KeyPairAuth, type MCPDiscovery, Namespace, NoAuth, NotFoundError, Operation, type OperationDetails, type OperationInfo, OperationManager, type OperationPayload, type OperationRunner, RateLimitError, RunStatus, type SSEEvent, type SecretExtractInput, type SecretExtractResult, SecretManager, type SecretSetInput, type SecretSetResult, type StatsData, type StatusData, type UCANAttenuation, type UCANCapability, type UCANIssueInput, type UCANIssueResult, UCANManager, type UCANVerifyResult, VENUE_RELAY, Venue, type VenueConstructor, type VenueData, VenueIdentityChangedError, type VenueInterface, type VenueOptions, type WorkspaceAggregateResult, type WorkspaceAppendInput, type WorkspaceAppendResult, type WorkspaceCopyResult, type WorkspaceCountResult, type WorkspaceDeleteInput, type WorkspaceDeleteResult, type WorkspaceInspectInput, type WorkspaceInspectResult, type WorkspaceListInput, type WorkspaceListResult, WorkspaceManager, type WorkspaceReadInput, type WorkspaceReadResult, type WorkspaceSliceInput, type WorkspaceSliceResult, type WorkspaceWriteInput, type WorkspaceWriteResult, assetHash, createSSEEvent, createUCANJWT, decodePublicKey, didFor, didFromPublicKey, didMethod, didUrl, encodePublicKey, fetchStreamWithError, fetchWithError, generateKeyPair, getAssetIdFromPath, getAssetIdFromVenueId, getAssetMetadataStore, getParsedAssetId, grant, hexToPrivateKey, identityToken, isDid, isJobComplete, isJobFinished, isJobPaused, logger, parseDidUrl, parseRetryAfterMs, parseSSEStream, privateKeyToHex, relayDelegation, retryDelayMs, setAssetMetadataStore, venueBaseUrlCandidates };
|
package/dist/index.d.ts
CHANGED
|
@@ -367,6 +367,13 @@ declare class AgentManager {
|
|
|
367
367
|
* No polling required.
|
|
368
368
|
*/
|
|
369
369
|
chat(agentId: string, message: unknown, sessionId?: string): Promise<AgentChatResult>;
|
|
370
|
+
/**
|
|
371
|
+
* Set (or clear, by omitting `title` / passing an empty string) a
|
|
372
|
+
* session's free-form human-facing title — persisted on the venue in
|
|
373
|
+
* the session's own metadata, visible to every client and party in the
|
|
374
|
+
* session (not a per-browser local override).
|
|
375
|
+
*/
|
|
376
|
+
renameSession(agentId: string, sessionId: string, title?: string): Promise<AgentRenameSessionResult>;
|
|
370
377
|
trigger(agentId: string): Promise<AgentTriggerResult>;
|
|
371
378
|
/**
|
|
372
379
|
* List the caller's agents. **Job-free** on covia ≥ 0.4: goes through
|
|
@@ -1083,6 +1090,12 @@ interface AgentSuspendResult {
|
|
|
1083
1090
|
agentId: string;
|
|
1084
1091
|
status: string;
|
|
1085
1092
|
}
|
|
1093
|
+
interface AgentRenameSessionResult {
|
|
1094
|
+
agentId: string;
|
|
1095
|
+
sessionId: string;
|
|
1096
|
+
/** Absent when the title was cleared (an omitted/blank title on the call). */
|
|
1097
|
+
title?: string;
|
|
1098
|
+
}
|
|
1086
1099
|
interface AgentResumeInput {
|
|
1087
1100
|
agentId: string;
|
|
1088
1101
|
autoWake?: boolean;
|
|
@@ -1680,4 +1693,4 @@ declare function grant(ownerPrivateKey: Uint8Array, audienceDID: string, withRes
|
|
|
1680
1693
|
*/
|
|
1681
1694
|
declare function relayDelegation(privateKey: Uint8Array, venueDID: string, lifetimeSeconds: number, caps?: UCANCapability[]): string;
|
|
1682
1695
|
|
|
1683
|
-
export { type AdapterInfo, AdapterManager, type AdaptersResult, Agent, type AgentCancelTaskInput, type AgentCard, type AgentChatInput, type AgentChatResult, type AgentCompleteTaskResult, type AgentContextInput, type AgentCreateInput, type AgentCreateResult, type AgentDeleteInput, type AgentDeleteResult, type AgentFailTaskResult, type AgentForkInput, type AgentForkResult, type AgentInfoResult, type AgentListInput, type AgentListResult, AgentManager, type AgentMessageInput, type AgentMessageResult, type AgentRequestInput, type AgentRequestResult, type AgentResumeInput, AgentStatus, type AgentSuspendResult, type AgentTriggerInput, type AgentTriggerResult, type AgentUpdateInput, Asset, type AssetID, type AssetList, type AssetListOptions, AssetManager, type AssetMetadata, type AssetMetadataStore, AssetNotFoundError, type AssetPinResult, Auth, BasicAuth, BearerAuth, ChatSession, type ConnectionAttempt, type ContentDetails, type ContentHashResult, CoviaConnectionError, type CoviaConnectionErrorOptions, CoviaError, CoviaTimeoutError, type Credentials, CredentialsHTTP, type DIDDocument, type DIDURL, DataAsset, Ed25519Auth, type FunctionInfo, type FunctionsResult, Grid, GridError, type GroupCount, type InvokeOptions, type InvokePayload, Job, JobFailedError, JobManager, type JobMetadata, JobNotFoundError, JobStatus, KeyPairAuth, type MCPDiscovery, Namespace, NoAuth, NotFoundError, Operation, type OperationDetails, type OperationInfo, OperationManager, type OperationPayload, type OperationRunner, RateLimitError, RunStatus, type SSEEvent, type SecretExtractInput, type SecretExtractResult, SecretManager, type SecretSetInput, type SecretSetResult, type StatsData, type StatusData, type UCANAttenuation, type UCANCapability, type UCANIssueInput, type UCANIssueResult, UCANManager, type UCANVerifyResult, VENUE_RELAY, Venue, type VenueConstructor, type VenueData, VenueIdentityChangedError, type VenueInterface, type VenueOptions, type WorkspaceAggregateResult, type WorkspaceAppendInput, type WorkspaceAppendResult, type WorkspaceCopyResult, type WorkspaceCountResult, type WorkspaceDeleteInput, type WorkspaceDeleteResult, type WorkspaceInspectInput, type WorkspaceInspectResult, type WorkspaceListInput, type WorkspaceListResult, WorkspaceManager, type WorkspaceReadInput, type WorkspaceReadResult, type WorkspaceSliceInput, type WorkspaceSliceResult, type WorkspaceWriteInput, type WorkspaceWriteResult, assetHash, createSSEEvent, createUCANJWT, decodePublicKey, didFor, didFromPublicKey, didMethod, didUrl, encodePublicKey, fetchStreamWithError, fetchWithError, generateKeyPair, getAssetIdFromPath, getAssetIdFromVenueId, getAssetMetadataStore, getParsedAssetId, grant, hexToPrivateKey, identityToken, isDid, isJobComplete, isJobFinished, isJobPaused, logger, parseDidUrl, parseRetryAfterMs, parseSSEStream, privateKeyToHex, relayDelegation, retryDelayMs, setAssetMetadataStore, venueBaseUrlCandidates };
|
|
1696
|
+
export { type AdapterInfo, AdapterManager, type AdaptersResult, Agent, type AgentCancelTaskInput, type AgentCard, type AgentChatInput, type AgentChatResult, type AgentCompleteTaskResult, type AgentContextInput, type AgentCreateInput, type AgentCreateResult, type AgentDeleteInput, type AgentDeleteResult, type AgentFailTaskResult, type AgentForkInput, type AgentForkResult, type AgentInfoResult, type AgentListInput, type AgentListResult, AgentManager, type AgentMessageInput, type AgentMessageResult, type AgentRenameSessionResult, type AgentRequestInput, type AgentRequestResult, type AgentResumeInput, AgentStatus, type AgentSuspendResult, type AgentTriggerInput, type AgentTriggerResult, type AgentUpdateInput, Asset, type AssetID, type AssetList, type AssetListOptions, AssetManager, type AssetMetadata, type AssetMetadataStore, AssetNotFoundError, type AssetPinResult, Auth, BasicAuth, BearerAuth, ChatSession, type ConnectionAttempt, type ContentDetails, type ContentHashResult, CoviaConnectionError, type CoviaConnectionErrorOptions, CoviaError, CoviaTimeoutError, type Credentials, CredentialsHTTP, type DIDDocument, type DIDURL, DataAsset, Ed25519Auth, type FunctionInfo, type FunctionsResult, Grid, GridError, type GroupCount, type InvokeOptions, type InvokePayload, Job, JobFailedError, JobManager, type JobMetadata, JobNotFoundError, JobStatus, KeyPairAuth, type MCPDiscovery, Namespace, NoAuth, NotFoundError, Operation, type OperationDetails, type OperationInfo, OperationManager, type OperationPayload, type OperationRunner, RateLimitError, RunStatus, type SSEEvent, type SecretExtractInput, type SecretExtractResult, SecretManager, type SecretSetInput, type SecretSetResult, type StatsData, type StatusData, type UCANAttenuation, type UCANCapability, type UCANIssueInput, type UCANIssueResult, UCANManager, type UCANVerifyResult, VENUE_RELAY, Venue, type VenueConstructor, type VenueData, VenueIdentityChangedError, type VenueInterface, type VenueOptions, type WorkspaceAggregateResult, type WorkspaceAppendInput, type WorkspaceAppendResult, type WorkspaceCopyResult, type WorkspaceCountResult, type WorkspaceDeleteInput, type WorkspaceDeleteResult, type WorkspaceInspectInput, type WorkspaceInspectResult, type WorkspaceListInput, type WorkspaceListResult, WorkspaceManager, type WorkspaceReadInput, type WorkspaceReadResult, type WorkspaceSliceInput, type WorkspaceSliceResult, type WorkspaceWriteInput, type WorkspaceWriteResult, assetHash, createSSEEvent, createUCANJWT, decodePublicKey, didFor, didFromPublicKey, didMethod, didUrl, encodePublicKey, fetchStreamWithError, fetchWithError, generateKeyPair, getAssetIdFromPath, getAssetIdFromVenueId, getAssetMetadataStore, getParsedAssetId, grant, hexToPrivateKey, identityToken, isDid, isJobComplete, isJobFinished, isJobPaused, logger, parseDidUrl, parseRetryAfterMs, parseSSEStream, privateKeyToHex, relayDelegation, retryDelayMs, setAssetMetadataStore, venueBaseUrlCandidates };
|
package/dist/index.js
CHANGED
|
@@ -77,7 +77,8 @@ var JobFailedError = class extends CoviaError {
|
|
|
77
77
|
const status = jobData.status ?? "unknown";
|
|
78
78
|
let msg = `Job ${id} ${status}`;
|
|
79
79
|
const output = jobData.output;
|
|
80
|
-
const
|
|
80
|
+
const outputErrText = output && typeof output === "object" && "error" in output ? output.error : void 0;
|
|
81
|
+
const errText = typeof jobData.error === "string" ? jobData.error : outputErrText;
|
|
81
82
|
if (typeof errText === "string") {
|
|
82
83
|
msg += `: ${errText}`;
|
|
83
84
|
}
|
|
@@ -1682,6 +1683,15 @@ var AgentManager = class {
|
|
|
1682
1683
|
async chat(agentId, message, sessionId) {
|
|
1683
1684
|
return this.venue.operations.run("v/ops/agent/chat", { agentId, message, sessionId });
|
|
1684
1685
|
}
|
|
1686
|
+
/**
|
|
1687
|
+
* Set (or clear, by omitting `title` / passing an empty string) a
|
|
1688
|
+
* session's free-form human-facing title — persisted on the venue in
|
|
1689
|
+
* the session's own metadata, visible to every client and party in the
|
|
1690
|
+
* session (not a per-browser local override).
|
|
1691
|
+
*/
|
|
1692
|
+
async renameSession(agentId, sessionId, title) {
|
|
1693
|
+
return this.venue.operations.run("v/ops/agent/rename-session", { agentId, sessionId, title });
|
|
1694
|
+
}
|
|
1685
1695
|
async trigger(agentId) {
|
|
1686
1696
|
return this.venue.operations.run("v/ops/agent/trigger", { agentId });
|
|
1687
1697
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -75,7 +75,8 @@ var JobFailedError = class extends CoviaError {
|
|
|
75
75
|
const status = jobData.status ?? "unknown";
|
|
76
76
|
let msg = `Job ${id} ${status}`;
|
|
77
77
|
const output = jobData.output;
|
|
78
|
-
const
|
|
78
|
+
const outputErrText = output && typeof output === "object" && "error" in output ? output.error : void 0;
|
|
79
|
+
const errText = typeof jobData.error === "string" ? jobData.error : outputErrText;
|
|
79
80
|
if (typeof errText === "string") {
|
|
80
81
|
msg += `: ${errText}`;
|
|
81
82
|
}
|
|
@@ -1680,6 +1681,15 @@ var AgentManager = class {
|
|
|
1680
1681
|
async chat(agentId, message, sessionId) {
|
|
1681
1682
|
return this.venue.operations.run("v/ops/agent/chat", { agentId, message, sessionId });
|
|
1682
1683
|
}
|
|
1684
|
+
/**
|
|
1685
|
+
* Set (or clear, by omitting `title` / passing an empty string) a
|
|
1686
|
+
* session's free-form human-facing title — persisted on the venue in
|
|
1687
|
+
* the session's own metadata, visible to every client and party in the
|
|
1688
|
+
* session (not a per-browser local override).
|
|
1689
|
+
*/
|
|
1690
|
+
async renameSession(agentId, sessionId, title) {
|
|
1691
|
+
return this.venue.operations.run("v/ops/agent/rename-session", { agentId, sessionId, title });
|
|
1692
|
+
}
|
|
1683
1693
|
async trigger(agentId) {
|
|
1684
1694
|
return this.venue.operations.run("v/ops/agent/trigger", { agentId });
|
|
1685
1695
|
}
|