@topolo/sdk 0.15.0 → 0.16.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 +14 -0
- package/dist/index.cjs +261 -213
- package/dist/index.d.cts +66 -59
- package/dist/index.d.ts +66 -59
- package/dist/index.js +258 -213
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -48,6 +48,67 @@ interface TopoloActionValidationResult {
|
|
|
48
48
|
}
|
|
49
49
|
declare function validateTopoloActionInput(schema: Record<string, unknown>, input: unknown): TopoloActionValidationResult;
|
|
50
50
|
|
|
51
|
+
declare const ACTOR_ENVELOPE_VERSION: 1;
|
|
52
|
+
declare const TOPOLO_ACTOR_ENVELOPE_HEADER: "X-Topolo-Actor-Envelope";
|
|
53
|
+
type ActorPrincipalType = 'human' | 'managed_agent' | 'external_agent' | 'service' | 'browser_automation';
|
|
54
|
+
type AccountableSubjectType = 'human' | 'organization';
|
|
55
|
+
type ActorChannel = 'web' | 'mobile' | 'cli' | 'mcp' | 'api' | 'workflow' | 'browser_automation';
|
|
56
|
+
type ActorAssurance = 'authenticated' | 'workload_identity' | 'user_verified';
|
|
57
|
+
interface ActorIdentity {
|
|
58
|
+
principalType: ActorPrincipalType;
|
|
59
|
+
principalId: string;
|
|
60
|
+
displayName?: string;
|
|
61
|
+
installationId?: string;
|
|
62
|
+
agentInstanceId?: string;
|
|
63
|
+
browserSessionId?: string;
|
|
64
|
+
provider?: string;
|
|
65
|
+
model?: string;
|
|
66
|
+
}
|
|
67
|
+
interface AccountableSubject {
|
|
68
|
+
principalType: AccountableSubjectType;
|
|
69
|
+
principalId: string;
|
|
70
|
+
displayName?: string;
|
|
71
|
+
}
|
|
72
|
+
interface ActorDelegationHop {
|
|
73
|
+
principalType: ActorPrincipalType;
|
|
74
|
+
principalId: string;
|
|
75
|
+
}
|
|
76
|
+
interface ActorEnvelope {
|
|
77
|
+
schemaVersion: typeof ACTOR_ENVELOPE_VERSION;
|
|
78
|
+
organizationId: string;
|
|
79
|
+
accountableSubject: AccountableSubject;
|
|
80
|
+
performer: ActorIdentity;
|
|
81
|
+
delegation: {
|
|
82
|
+
taskId: string;
|
|
83
|
+
runId: string;
|
|
84
|
+
lineage: ActorDelegationHop[];
|
|
85
|
+
} | null;
|
|
86
|
+
channel: ActorChannel;
|
|
87
|
+
assurance: {
|
|
88
|
+
level: ActorAssurance;
|
|
89
|
+
methods: string[];
|
|
90
|
+
};
|
|
91
|
+
action: {
|
|
92
|
+
requestId: string;
|
|
93
|
+
actionId: string;
|
|
94
|
+
resourceType?: string;
|
|
95
|
+
resourceId?: string;
|
|
96
|
+
inputHash: string;
|
|
97
|
+
};
|
|
98
|
+
issuedAt: string;
|
|
99
|
+
expiresAt?: string;
|
|
100
|
+
}
|
|
101
|
+
declare class ActorEnvelopeValidationError extends Error {
|
|
102
|
+
readonly path: string;
|
|
103
|
+
constructor(path: string, message: string);
|
|
104
|
+
}
|
|
105
|
+
declare function parseActorEnvelope(value: unknown): ActorEnvelope;
|
|
106
|
+
declare function canonicalizeActorEnvelope(value: unknown): string;
|
|
107
|
+
declare function encodeActorEnvelopeHeader(value: unknown): string;
|
|
108
|
+
declare function decodeActorEnvelopeHeader(value: string): ActorEnvelope;
|
|
109
|
+
declare function canonicalJson(value: unknown): string;
|
|
110
|
+
declare function sha256CanonicalValue(value: unknown): Promise<string>;
|
|
111
|
+
|
|
51
112
|
interface TopoloInlineBase64UploadContract {
|
|
52
113
|
profile: 'inline-base64';
|
|
53
114
|
contentField: string;
|
|
@@ -164,6 +225,8 @@ interface RequestOptions {
|
|
|
164
225
|
};
|
|
165
226
|
/** Explicit write-acknowledgement for mutating calls. */
|
|
166
227
|
confirm?: boolean;
|
|
228
|
+
/** Canonical accountable-subject and performer provenance for this request. */
|
|
229
|
+
actorEnvelope?: ActorEnvelope;
|
|
167
230
|
/** Extra headers appended after auth/audit headers. */
|
|
168
231
|
headers?: Record<string, string>;
|
|
169
232
|
signal?: AbortSignal;
|
|
@@ -426,6 +489,7 @@ declare class TopoloClient {
|
|
|
426
489
|
resourceType: string;
|
|
427
490
|
resourceId: string;
|
|
428
491
|
};
|
|
492
|
+
actorEnvelope?: ActorEnvelope;
|
|
429
493
|
}): Promise<T>;
|
|
430
494
|
uploadAction<T = unknown>(action: string, content: Uint8Array | ArrayBuffer, input: Record<string, unknown>, options: TopoloActionUploadOptions & {
|
|
431
495
|
confirm?: boolean;
|
|
@@ -467,6 +531,7 @@ declare class TopoloClient {
|
|
|
467
531
|
resourceType: string;
|
|
468
532
|
resourceId: string;
|
|
469
533
|
};
|
|
534
|
+
actorEnvelope?: ActorEnvelope;
|
|
470
535
|
}): Promise<T>;
|
|
471
536
|
private executeResolvedAction;
|
|
472
537
|
/**
|
|
@@ -902,64 +967,6 @@ declare class IdentityModule {
|
|
|
902
967
|
whoami(): Promise<CredentialIntrospection>;
|
|
903
968
|
}
|
|
904
969
|
|
|
905
|
-
declare const ACTOR_ENVELOPE_VERSION: 1;
|
|
906
|
-
type ActorPrincipalType = 'human' | 'managed_agent' | 'external_agent' | 'service' | 'browser_automation';
|
|
907
|
-
type AccountableSubjectType = 'human' | 'organization';
|
|
908
|
-
type ActorChannel = 'web' | 'mobile' | 'cli' | 'mcp' | 'api' | 'workflow' | 'browser_automation';
|
|
909
|
-
type ActorAssurance = 'authenticated' | 'workload_identity' | 'user_verified';
|
|
910
|
-
interface ActorIdentity {
|
|
911
|
-
principalType: ActorPrincipalType;
|
|
912
|
-
principalId: string;
|
|
913
|
-
displayName?: string;
|
|
914
|
-
installationId?: string;
|
|
915
|
-
agentInstanceId?: string;
|
|
916
|
-
browserSessionId?: string;
|
|
917
|
-
provider?: string;
|
|
918
|
-
model?: string;
|
|
919
|
-
}
|
|
920
|
-
interface AccountableSubject {
|
|
921
|
-
principalType: AccountableSubjectType;
|
|
922
|
-
principalId: string;
|
|
923
|
-
displayName?: string;
|
|
924
|
-
}
|
|
925
|
-
interface ActorDelegationHop {
|
|
926
|
-
principalType: ActorPrincipalType;
|
|
927
|
-
principalId: string;
|
|
928
|
-
}
|
|
929
|
-
interface ActorEnvelope {
|
|
930
|
-
schemaVersion: typeof ACTOR_ENVELOPE_VERSION;
|
|
931
|
-
organizationId: string;
|
|
932
|
-
accountableSubject: AccountableSubject;
|
|
933
|
-
performer: ActorIdentity;
|
|
934
|
-
delegation: {
|
|
935
|
-
taskId: string;
|
|
936
|
-
runId: string;
|
|
937
|
-
lineage: ActorDelegationHop[];
|
|
938
|
-
} | null;
|
|
939
|
-
channel: ActorChannel;
|
|
940
|
-
assurance: {
|
|
941
|
-
level: ActorAssurance;
|
|
942
|
-
methods: string[];
|
|
943
|
-
};
|
|
944
|
-
action: {
|
|
945
|
-
requestId: string;
|
|
946
|
-
actionId: string;
|
|
947
|
-
resourceType?: string;
|
|
948
|
-
resourceId?: string;
|
|
949
|
-
inputHash: string;
|
|
950
|
-
};
|
|
951
|
-
issuedAt: string;
|
|
952
|
-
expiresAt?: string;
|
|
953
|
-
}
|
|
954
|
-
declare class ActorEnvelopeValidationError extends Error {
|
|
955
|
-
readonly path: string;
|
|
956
|
-
constructor(path: string, message: string);
|
|
957
|
-
}
|
|
958
|
-
declare function parseActorEnvelope(value: unknown): ActorEnvelope;
|
|
959
|
-
declare function canonicalizeActorEnvelope(value: unknown): string;
|
|
960
|
-
declare function canonicalJson(value: unknown): string;
|
|
961
|
-
declare function sha256CanonicalValue(value: unknown): Promise<string>;
|
|
962
|
-
|
|
963
970
|
interface TopoloWorkspace {
|
|
964
971
|
id: string;
|
|
965
972
|
appId: string;
|
|
@@ -1652,4 +1659,4 @@ declare function createTopolo(options: TopoloClientOptions): {
|
|
|
1652
1659
|
};
|
|
1653
1660
|
type Topolo = ReturnType<typeof createTopolo>;
|
|
1654
1661
|
|
|
1655
|
-
export { ACTION_CATALOG_DIGEST_ALGORITHM, ACTOR_ENVELOPE_VERSION, type AccountableSubject, type AccountableSubjectType, type ActionContractManifest, type ActionContractSource, type ActorAssurance, type ActorChannel, type ActorDelegationHop, type ActorEnvelope, ActorEnvelopeValidationError, type ActorIdentity, type ActorPrincipalType, type AgentIdentity, type AppApiId, type ApplicationCatalogEntry, type ApplicationDeployTarget, type ApplicationDirectory, type ApplicationDirectoryApplication, type ApplicationDirectoryClient, type ApplicationDirectorySource, type ApplicationId, type CredentialIntrospection, type CrmContactSummary, CrmModule, DEFAULT_APP_URLS, type DeviceAuthorizationResponse, IdentityModule, type ListContactsOptions, type ListContactsResult, type OAuthHelperOptions, type P2PActionDetail, type P2PActionRequestInput, type P2PActionRequestResult, type P2PActionRow, type P2PActionRun, type P2PCapability, type P2PConnection, type P2PHold, type P2PLedgerEntry, P2PModule, type P2PPolicy, type P2PPricingModel, type P2PSettlementBatch, type P2PSettlementGroup, type PublishCapabilityInput, type RequestOptions, type ServiceCatalogUrlEntry, TOPOLO_ENVIRONMENT_SERVICE_URLS, TOPOLO_RUNTIME_ENVIRONMENTS, TOPOLO_WIDGET_CONTRACT_VERSION, TOPOLO_WIDGET_ENDPOINT, TOPOLO_WIDGET_OUTPUT_SCHEMA, TOPOLO_WIDGET_REFRESH_INTERVAL_MS, type TokenResponse, type Topolo, type TopoloActionAgentContract, type TopoloActionCatalogEntry, type TopoloActionCatalogSummary, type TopoloActionDigestInput, type TopoloActionPlan, type TopoloActionPreparation, type TopoloActionUploadOptions, type TopoloActionValidationIssue, type TopoloActionValidationResult, type TopoloActionsWidget, type TopoloActivityWidget, type TopoloAgentExecutionContext, type TopoloApiKeyResourceMetadata, TopoloAuthError, type TopoloBinaryResponse, type TopoloBindableResource, type TopoloBindableResourceCatalog, type TopoloChartWidget, TopoloClient, type TopoloClientOptions, TopoloConfirmationRequiredError, type TopoloCredential, type TopoloDebugEvent, TopoloHttpError, type TopoloInlineBase64UploadContract, type TopoloJsonSchema, type TopoloNotificationsWidget, TopoloOAuth, TopoloPermissionError, type TopoloRuntimeEnvironment, TopoloSdkError, type TopoloServiceCatalogEntry, type TopoloStatsWidget, type TopoloWidget, type TopoloWidgetAccessibility, type TopoloWidgetActionBinding, type TopoloWidgetActionRecovery, type TopoloWidgetActivityItem, type TopoloWidgetApiError, type TopoloWidgetApiErrorResponse, type TopoloWidgetApiResponse, type TopoloWidgetApiSuccessResponse, type TopoloWidgetBase, type TopoloWidgetConfig, type TopoloWidgetConfiguration, type TopoloWidgetConfigurationField, type TopoloWidgetConfigurationOption, type TopoloWidgetContext, type TopoloWidgetContribution, type TopoloWidgetDatasetDefinition, type TopoloWidgetDimension, type TopoloWidgetDimensionDefinition, type TopoloWidgetDraft, type TopoloWidgetDrilldown, type TopoloWidgetErrorResponseOptions, type TopoloWidgetEventDefinition, type TopoloWidgetLifecycleStage, type TopoloWidgetLocalization, type TopoloWidgetMetric, type TopoloWidgetMetricAggregation, type TopoloWidgetMetricComparison, type TopoloWidgetMetricDefinition, type TopoloWidgetMetricSemantic, type TopoloWidgetNotificationItem, type TopoloWidgetPeriod, type TopoloWidgetPresentation, type TopoloWidgetRefreshPolicy, type TopoloWidgetResourceBinding, type TopoloWidgetResponseOptions, type TopoloWidgetSeries, type TopoloWidgetSeriesDefinition, type TopoloWidgetSeriesPoint, type TopoloWidgetSize, type TopoloWidgetState, type TopoloWidgetStatus, type TopoloWidgetType, type TopoloWidgetValidationResult, type TopoloWidgetVisualizationFamily, type TopoloWidgetWorkspaceSelector, type TopoloWorkspace, type TopoloWorkspaceListResult, type TopoloWorkspaceMutationResult, type TopoloWorkspacePolicy, WorkspacesModule, actionContractCompleteness, applicationEntryFromCatalog, assertTopoloServiceUrlEnvironment, canonicalJson, canonicalTopoloErrorCode, canonicalTopoloRequestId, canonicalTopoloRequired, canonicalTopoloRetryAfter, canonicalizeActorEnvelope, compactActionCatalogEntry, compactActionPlan, compactActionPreparation, compactActionResult, compactActionValidation, createTopolo, createTopoloAgentExecutionContext, createTopoloWidgetError, createTopoloWidgetResponse, defineTopoloActionsWidget, defineTopoloActivityWidget, defineTopoloChartWidget, defineTopoloNotificationsWidget, defineTopoloStatsWidget, digestTopoloActionCatalog, encodeTopoloActionBase64, enrichActionContract, extractTopoloServiceErrorCode, extractTopoloServiceErrorDetails, formatDirectoryApplicationIds, friendlyAppId, isTopoloWidgetOutputSchema, listApplicationDirectory, parseActorEnvelope, parseTopoloActionUploadContract, preferExactActionMatches, prepareTopoloActionBase64UploadInput, prepareTopoloActionUploadInput, publicTopoloErrorMessage, resolveApplicationDirectoryEntry, resolveCatalogServiceUrl, resolveServiceUrl, sha256CanonicalValue, topoloErrorHint, topoloServiceOrigins, validateTopoloActionInput, validateTopoloWidgetResponse };
|
|
1662
|
+
export { ACTION_CATALOG_DIGEST_ALGORITHM, ACTOR_ENVELOPE_VERSION, type AccountableSubject, type AccountableSubjectType, type ActionContractManifest, type ActionContractSource, type ActorAssurance, type ActorChannel, type ActorDelegationHop, type ActorEnvelope, ActorEnvelopeValidationError, type ActorIdentity, type ActorPrincipalType, type AgentIdentity, type AppApiId, type ApplicationCatalogEntry, type ApplicationDeployTarget, type ApplicationDirectory, type ApplicationDirectoryApplication, type ApplicationDirectoryClient, type ApplicationDirectorySource, type ApplicationId, type CredentialIntrospection, type CrmContactSummary, CrmModule, DEFAULT_APP_URLS, type DeviceAuthorizationResponse, IdentityModule, type ListContactsOptions, type ListContactsResult, type OAuthHelperOptions, type P2PActionDetail, type P2PActionRequestInput, type P2PActionRequestResult, type P2PActionRow, type P2PActionRun, type P2PCapability, type P2PConnection, type P2PHold, type P2PLedgerEntry, P2PModule, type P2PPolicy, type P2PPricingModel, type P2PSettlementBatch, type P2PSettlementGroup, type PublishCapabilityInput, type RequestOptions, type ServiceCatalogUrlEntry, TOPOLO_ACTOR_ENVELOPE_HEADER, TOPOLO_ENVIRONMENT_SERVICE_URLS, TOPOLO_RUNTIME_ENVIRONMENTS, TOPOLO_WIDGET_CONTRACT_VERSION, TOPOLO_WIDGET_ENDPOINT, TOPOLO_WIDGET_OUTPUT_SCHEMA, TOPOLO_WIDGET_REFRESH_INTERVAL_MS, type TokenResponse, type Topolo, type TopoloActionAgentContract, type TopoloActionCatalogEntry, type TopoloActionCatalogSummary, type TopoloActionDigestInput, type TopoloActionPlan, type TopoloActionPreparation, type TopoloActionUploadOptions, type TopoloActionValidationIssue, type TopoloActionValidationResult, type TopoloActionsWidget, type TopoloActivityWidget, type TopoloAgentExecutionContext, type TopoloApiKeyResourceMetadata, TopoloAuthError, type TopoloBinaryResponse, type TopoloBindableResource, type TopoloBindableResourceCatalog, type TopoloChartWidget, TopoloClient, type TopoloClientOptions, TopoloConfirmationRequiredError, type TopoloCredential, type TopoloDebugEvent, TopoloHttpError, type TopoloInlineBase64UploadContract, type TopoloJsonSchema, type TopoloNotificationsWidget, TopoloOAuth, TopoloPermissionError, type TopoloRuntimeEnvironment, TopoloSdkError, type TopoloServiceCatalogEntry, type TopoloStatsWidget, type TopoloWidget, type TopoloWidgetAccessibility, type TopoloWidgetActionBinding, type TopoloWidgetActionRecovery, type TopoloWidgetActivityItem, type TopoloWidgetApiError, type TopoloWidgetApiErrorResponse, type TopoloWidgetApiResponse, type TopoloWidgetApiSuccessResponse, type TopoloWidgetBase, type TopoloWidgetConfig, type TopoloWidgetConfiguration, type TopoloWidgetConfigurationField, type TopoloWidgetConfigurationOption, type TopoloWidgetContext, type TopoloWidgetContribution, type TopoloWidgetDatasetDefinition, type TopoloWidgetDimension, type TopoloWidgetDimensionDefinition, type TopoloWidgetDraft, type TopoloWidgetDrilldown, type TopoloWidgetErrorResponseOptions, type TopoloWidgetEventDefinition, type TopoloWidgetLifecycleStage, type TopoloWidgetLocalization, type TopoloWidgetMetric, type TopoloWidgetMetricAggregation, type TopoloWidgetMetricComparison, type TopoloWidgetMetricDefinition, type TopoloWidgetMetricSemantic, type TopoloWidgetNotificationItem, type TopoloWidgetPeriod, type TopoloWidgetPresentation, type TopoloWidgetRefreshPolicy, type TopoloWidgetResourceBinding, type TopoloWidgetResponseOptions, type TopoloWidgetSeries, type TopoloWidgetSeriesDefinition, type TopoloWidgetSeriesPoint, type TopoloWidgetSize, type TopoloWidgetState, type TopoloWidgetStatus, type TopoloWidgetType, type TopoloWidgetValidationResult, type TopoloWidgetVisualizationFamily, type TopoloWidgetWorkspaceSelector, type TopoloWorkspace, type TopoloWorkspaceListResult, type TopoloWorkspaceMutationResult, type TopoloWorkspacePolicy, WorkspacesModule, actionContractCompleteness, applicationEntryFromCatalog, assertTopoloServiceUrlEnvironment, canonicalJson, canonicalTopoloErrorCode, canonicalTopoloRequestId, canonicalTopoloRequired, canonicalTopoloRetryAfter, canonicalizeActorEnvelope, compactActionCatalogEntry, compactActionPlan, compactActionPreparation, compactActionResult, compactActionValidation, createTopolo, createTopoloAgentExecutionContext, createTopoloWidgetError, createTopoloWidgetResponse, decodeActorEnvelopeHeader, defineTopoloActionsWidget, defineTopoloActivityWidget, defineTopoloChartWidget, defineTopoloNotificationsWidget, defineTopoloStatsWidget, digestTopoloActionCatalog, encodeActorEnvelopeHeader, encodeTopoloActionBase64, enrichActionContract, extractTopoloServiceErrorCode, extractTopoloServiceErrorDetails, formatDirectoryApplicationIds, friendlyAppId, isTopoloWidgetOutputSchema, listApplicationDirectory, parseActorEnvelope, parseTopoloActionUploadContract, preferExactActionMatches, prepareTopoloActionBase64UploadInput, prepareTopoloActionUploadInput, publicTopoloErrorMessage, resolveApplicationDirectoryEntry, resolveCatalogServiceUrl, resolveServiceUrl, sha256CanonicalValue, topoloErrorHint, topoloServiceOrigins, validateTopoloActionInput, validateTopoloWidgetResponse };
|
package/dist/index.d.ts
CHANGED
|
@@ -48,6 +48,67 @@ interface TopoloActionValidationResult {
|
|
|
48
48
|
}
|
|
49
49
|
declare function validateTopoloActionInput(schema: Record<string, unknown>, input: unknown): TopoloActionValidationResult;
|
|
50
50
|
|
|
51
|
+
declare const ACTOR_ENVELOPE_VERSION: 1;
|
|
52
|
+
declare const TOPOLO_ACTOR_ENVELOPE_HEADER: "X-Topolo-Actor-Envelope";
|
|
53
|
+
type ActorPrincipalType = 'human' | 'managed_agent' | 'external_agent' | 'service' | 'browser_automation';
|
|
54
|
+
type AccountableSubjectType = 'human' | 'organization';
|
|
55
|
+
type ActorChannel = 'web' | 'mobile' | 'cli' | 'mcp' | 'api' | 'workflow' | 'browser_automation';
|
|
56
|
+
type ActorAssurance = 'authenticated' | 'workload_identity' | 'user_verified';
|
|
57
|
+
interface ActorIdentity {
|
|
58
|
+
principalType: ActorPrincipalType;
|
|
59
|
+
principalId: string;
|
|
60
|
+
displayName?: string;
|
|
61
|
+
installationId?: string;
|
|
62
|
+
agentInstanceId?: string;
|
|
63
|
+
browserSessionId?: string;
|
|
64
|
+
provider?: string;
|
|
65
|
+
model?: string;
|
|
66
|
+
}
|
|
67
|
+
interface AccountableSubject {
|
|
68
|
+
principalType: AccountableSubjectType;
|
|
69
|
+
principalId: string;
|
|
70
|
+
displayName?: string;
|
|
71
|
+
}
|
|
72
|
+
interface ActorDelegationHop {
|
|
73
|
+
principalType: ActorPrincipalType;
|
|
74
|
+
principalId: string;
|
|
75
|
+
}
|
|
76
|
+
interface ActorEnvelope {
|
|
77
|
+
schemaVersion: typeof ACTOR_ENVELOPE_VERSION;
|
|
78
|
+
organizationId: string;
|
|
79
|
+
accountableSubject: AccountableSubject;
|
|
80
|
+
performer: ActorIdentity;
|
|
81
|
+
delegation: {
|
|
82
|
+
taskId: string;
|
|
83
|
+
runId: string;
|
|
84
|
+
lineage: ActorDelegationHop[];
|
|
85
|
+
} | null;
|
|
86
|
+
channel: ActorChannel;
|
|
87
|
+
assurance: {
|
|
88
|
+
level: ActorAssurance;
|
|
89
|
+
methods: string[];
|
|
90
|
+
};
|
|
91
|
+
action: {
|
|
92
|
+
requestId: string;
|
|
93
|
+
actionId: string;
|
|
94
|
+
resourceType?: string;
|
|
95
|
+
resourceId?: string;
|
|
96
|
+
inputHash: string;
|
|
97
|
+
};
|
|
98
|
+
issuedAt: string;
|
|
99
|
+
expiresAt?: string;
|
|
100
|
+
}
|
|
101
|
+
declare class ActorEnvelopeValidationError extends Error {
|
|
102
|
+
readonly path: string;
|
|
103
|
+
constructor(path: string, message: string);
|
|
104
|
+
}
|
|
105
|
+
declare function parseActorEnvelope(value: unknown): ActorEnvelope;
|
|
106
|
+
declare function canonicalizeActorEnvelope(value: unknown): string;
|
|
107
|
+
declare function encodeActorEnvelopeHeader(value: unknown): string;
|
|
108
|
+
declare function decodeActorEnvelopeHeader(value: string): ActorEnvelope;
|
|
109
|
+
declare function canonicalJson(value: unknown): string;
|
|
110
|
+
declare function sha256CanonicalValue(value: unknown): Promise<string>;
|
|
111
|
+
|
|
51
112
|
interface TopoloInlineBase64UploadContract {
|
|
52
113
|
profile: 'inline-base64';
|
|
53
114
|
contentField: string;
|
|
@@ -164,6 +225,8 @@ interface RequestOptions {
|
|
|
164
225
|
};
|
|
165
226
|
/** Explicit write-acknowledgement for mutating calls. */
|
|
166
227
|
confirm?: boolean;
|
|
228
|
+
/** Canonical accountable-subject and performer provenance for this request. */
|
|
229
|
+
actorEnvelope?: ActorEnvelope;
|
|
167
230
|
/** Extra headers appended after auth/audit headers. */
|
|
168
231
|
headers?: Record<string, string>;
|
|
169
232
|
signal?: AbortSignal;
|
|
@@ -426,6 +489,7 @@ declare class TopoloClient {
|
|
|
426
489
|
resourceType: string;
|
|
427
490
|
resourceId: string;
|
|
428
491
|
};
|
|
492
|
+
actorEnvelope?: ActorEnvelope;
|
|
429
493
|
}): Promise<T>;
|
|
430
494
|
uploadAction<T = unknown>(action: string, content: Uint8Array | ArrayBuffer, input: Record<string, unknown>, options: TopoloActionUploadOptions & {
|
|
431
495
|
confirm?: boolean;
|
|
@@ -467,6 +531,7 @@ declare class TopoloClient {
|
|
|
467
531
|
resourceType: string;
|
|
468
532
|
resourceId: string;
|
|
469
533
|
};
|
|
534
|
+
actorEnvelope?: ActorEnvelope;
|
|
470
535
|
}): Promise<T>;
|
|
471
536
|
private executeResolvedAction;
|
|
472
537
|
/**
|
|
@@ -902,64 +967,6 @@ declare class IdentityModule {
|
|
|
902
967
|
whoami(): Promise<CredentialIntrospection>;
|
|
903
968
|
}
|
|
904
969
|
|
|
905
|
-
declare const ACTOR_ENVELOPE_VERSION: 1;
|
|
906
|
-
type ActorPrincipalType = 'human' | 'managed_agent' | 'external_agent' | 'service' | 'browser_automation';
|
|
907
|
-
type AccountableSubjectType = 'human' | 'organization';
|
|
908
|
-
type ActorChannel = 'web' | 'mobile' | 'cli' | 'mcp' | 'api' | 'workflow' | 'browser_automation';
|
|
909
|
-
type ActorAssurance = 'authenticated' | 'workload_identity' | 'user_verified';
|
|
910
|
-
interface ActorIdentity {
|
|
911
|
-
principalType: ActorPrincipalType;
|
|
912
|
-
principalId: string;
|
|
913
|
-
displayName?: string;
|
|
914
|
-
installationId?: string;
|
|
915
|
-
agentInstanceId?: string;
|
|
916
|
-
browserSessionId?: string;
|
|
917
|
-
provider?: string;
|
|
918
|
-
model?: string;
|
|
919
|
-
}
|
|
920
|
-
interface AccountableSubject {
|
|
921
|
-
principalType: AccountableSubjectType;
|
|
922
|
-
principalId: string;
|
|
923
|
-
displayName?: string;
|
|
924
|
-
}
|
|
925
|
-
interface ActorDelegationHop {
|
|
926
|
-
principalType: ActorPrincipalType;
|
|
927
|
-
principalId: string;
|
|
928
|
-
}
|
|
929
|
-
interface ActorEnvelope {
|
|
930
|
-
schemaVersion: typeof ACTOR_ENVELOPE_VERSION;
|
|
931
|
-
organizationId: string;
|
|
932
|
-
accountableSubject: AccountableSubject;
|
|
933
|
-
performer: ActorIdentity;
|
|
934
|
-
delegation: {
|
|
935
|
-
taskId: string;
|
|
936
|
-
runId: string;
|
|
937
|
-
lineage: ActorDelegationHop[];
|
|
938
|
-
} | null;
|
|
939
|
-
channel: ActorChannel;
|
|
940
|
-
assurance: {
|
|
941
|
-
level: ActorAssurance;
|
|
942
|
-
methods: string[];
|
|
943
|
-
};
|
|
944
|
-
action: {
|
|
945
|
-
requestId: string;
|
|
946
|
-
actionId: string;
|
|
947
|
-
resourceType?: string;
|
|
948
|
-
resourceId?: string;
|
|
949
|
-
inputHash: string;
|
|
950
|
-
};
|
|
951
|
-
issuedAt: string;
|
|
952
|
-
expiresAt?: string;
|
|
953
|
-
}
|
|
954
|
-
declare class ActorEnvelopeValidationError extends Error {
|
|
955
|
-
readonly path: string;
|
|
956
|
-
constructor(path: string, message: string);
|
|
957
|
-
}
|
|
958
|
-
declare function parseActorEnvelope(value: unknown): ActorEnvelope;
|
|
959
|
-
declare function canonicalizeActorEnvelope(value: unknown): string;
|
|
960
|
-
declare function canonicalJson(value: unknown): string;
|
|
961
|
-
declare function sha256CanonicalValue(value: unknown): Promise<string>;
|
|
962
|
-
|
|
963
970
|
interface TopoloWorkspace {
|
|
964
971
|
id: string;
|
|
965
972
|
appId: string;
|
|
@@ -1652,4 +1659,4 @@ declare function createTopolo(options: TopoloClientOptions): {
|
|
|
1652
1659
|
};
|
|
1653
1660
|
type Topolo = ReturnType<typeof createTopolo>;
|
|
1654
1661
|
|
|
1655
|
-
export { ACTION_CATALOG_DIGEST_ALGORITHM, ACTOR_ENVELOPE_VERSION, type AccountableSubject, type AccountableSubjectType, type ActionContractManifest, type ActionContractSource, type ActorAssurance, type ActorChannel, type ActorDelegationHop, type ActorEnvelope, ActorEnvelopeValidationError, type ActorIdentity, type ActorPrincipalType, type AgentIdentity, type AppApiId, type ApplicationCatalogEntry, type ApplicationDeployTarget, type ApplicationDirectory, type ApplicationDirectoryApplication, type ApplicationDirectoryClient, type ApplicationDirectorySource, type ApplicationId, type CredentialIntrospection, type CrmContactSummary, CrmModule, DEFAULT_APP_URLS, type DeviceAuthorizationResponse, IdentityModule, type ListContactsOptions, type ListContactsResult, type OAuthHelperOptions, type P2PActionDetail, type P2PActionRequestInput, type P2PActionRequestResult, type P2PActionRow, type P2PActionRun, type P2PCapability, type P2PConnection, type P2PHold, type P2PLedgerEntry, P2PModule, type P2PPolicy, type P2PPricingModel, type P2PSettlementBatch, type P2PSettlementGroup, type PublishCapabilityInput, type RequestOptions, type ServiceCatalogUrlEntry, TOPOLO_ENVIRONMENT_SERVICE_URLS, TOPOLO_RUNTIME_ENVIRONMENTS, TOPOLO_WIDGET_CONTRACT_VERSION, TOPOLO_WIDGET_ENDPOINT, TOPOLO_WIDGET_OUTPUT_SCHEMA, TOPOLO_WIDGET_REFRESH_INTERVAL_MS, type TokenResponse, type Topolo, type TopoloActionAgentContract, type TopoloActionCatalogEntry, type TopoloActionCatalogSummary, type TopoloActionDigestInput, type TopoloActionPlan, type TopoloActionPreparation, type TopoloActionUploadOptions, type TopoloActionValidationIssue, type TopoloActionValidationResult, type TopoloActionsWidget, type TopoloActivityWidget, type TopoloAgentExecutionContext, type TopoloApiKeyResourceMetadata, TopoloAuthError, type TopoloBinaryResponse, type TopoloBindableResource, type TopoloBindableResourceCatalog, type TopoloChartWidget, TopoloClient, type TopoloClientOptions, TopoloConfirmationRequiredError, type TopoloCredential, type TopoloDebugEvent, TopoloHttpError, type TopoloInlineBase64UploadContract, type TopoloJsonSchema, type TopoloNotificationsWidget, TopoloOAuth, TopoloPermissionError, type TopoloRuntimeEnvironment, TopoloSdkError, type TopoloServiceCatalogEntry, type TopoloStatsWidget, type TopoloWidget, type TopoloWidgetAccessibility, type TopoloWidgetActionBinding, type TopoloWidgetActionRecovery, type TopoloWidgetActivityItem, type TopoloWidgetApiError, type TopoloWidgetApiErrorResponse, type TopoloWidgetApiResponse, type TopoloWidgetApiSuccessResponse, type TopoloWidgetBase, type TopoloWidgetConfig, type TopoloWidgetConfiguration, type TopoloWidgetConfigurationField, type TopoloWidgetConfigurationOption, type TopoloWidgetContext, type TopoloWidgetContribution, type TopoloWidgetDatasetDefinition, type TopoloWidgetDimension, type TopoloWidgetDimensionDefinition, type TopoloWidgetDraft, type TopoloWidgetDrilldown, type TopoloWidgetErrorResponseOptions, type TopoloWidgetEventDefinition, type TopoloWidgetLifecycleStage, type TopoloWidgetLocalization, type TopoloWidgetMetric, type TopoloWidgetMetricAggregation, type TopoloWidgetMetricComparison, type TopoloWidgetMetricDefinition, type TopoloWidgetMetricSemantic, type TopoloWidgetNotificationItem, type TopoloWidgetPeriod, type TopoloWidgetPresentation, type TopoloWidgetRefreshPolicy, type TopoloWidgetResourceBinding, type TopoloWidgetResponseOptions, type TopoloWidgetSeries, type TopoloWidgetSeriesDefinition, type TopoloWidgetSeriesPoint, type TopoloWidgetSize, type TopoloWidgetState, type TopoloWidgetStatus, type TopoloWidgetType, type TopoloWidgetValidationResult, type TopoloWidgetVisualizationFamily, type TopoloWidgetWorkspaceSelector, type TopoloWorkspace, type TopoloWorkspaceListResult, type TopoloWorkspaceMutationResult, type TopoloWorkspacePolicy, WorkspacesModule, actionContractCompleteness, applicationEntryFromCatalog, assertTopoloServiceUrlEnvironment, canonicalJson, canonicalTopoloErrorCode, canonicalTopoloRequestId, canonicalTopoloRequired, canonicalTopoloRetryAfter, canonicalizeActorEnvelope, compactActionCatalogEntry, compactActionPlan, compactActionPreparation, compactActionResult, compactActionValidation, createTopolo, createTopoloAgentExecutionContext, createTopoloWidgetError, createTopoloWidgetResponse, defineTopoloActionsWidget, defineTopoloActivityWidget, defineTopoloChartWidget, defineTopoloNotificationsWidget, defineTopoloStatsWidget, digestTopoloActionCatalog, encodeTopoloActionBase64, enrichActionContract, extractTopoloServiceErrorCode, extractTopoloServiceErrorDetails, formatDirectoryApplicationIds, friendlyAppId, isTopoloWidgetOutputSchema, listApplicationDirectory, parseActorEnvelope, parseTopoloActionUploadContract, preferExactActionMatches, prepareTopoloActionBase64UploadInput, prepareTopoloActionUploadInput, publicTopoloErrorMessage, resolveApplicationDirectoryEntry, resolveCatalogServiceUrl, resolveServiceUrl, sha256CanonicalValue, topoloErrorHint, topoloServiceOrigins, validateTopoloActionInput, validateTopoloWidgetResponse };
|
|
1662
|
+
export { ACTION_CATALOG_DIGEST_ALGORITHM, ACTOR_ENVELOPE_VERSION, type AccountableSubject, type AccountableSubjectType, type ActionContractManifest, type ActionContractSource, type ActorAssurance, type ActorChannel, type ActorDelegationHop, type ActorEnvelope, ActorEnvelopeValidationError, type ActorIdentity, type ActorPrincipalType, type AgentIdentity, type AppApiId, type ApplicationCatalogEntry, type ApplicationDeployTarget, type ApplicationDirectory, type ApplicationDirectoryApplication, type ApplicationDirectoryClient, type ApplicationDirectorySource, type ApplicationId, type CredentialIntrospection, type CrmContactSummary, CrmModule, DEFAULT_APP_URLS, type DeviceAuthorizationResponse, IdentityModule, type ListContactsOptions, type ListContactsResult, type OAuthHelperOptions, type P2PActionDetail, type P2PActionRequestInput, type P2PActionRequestResult, type P2PActionRow, type P2PActionRun, type P2PCapability, type P2PConnection, type P2PHold, type P2PLedgerEntry, P2PModule, type P2PPolicy, type P2PPricingModel, type P2PSettlementBatch, type P2PSettlementGroup, type PublishCapabilityInput, type RequestOptions, type ServiceCatalogUrlEntry, TOPOLO_ACTOR_ENVELOPE_HEADER, TOPOLO_ENVIRONMENT_SERVICE_URLS, TOPOLO_RUNTIME_ENVIRONMENTS, TOPOLO_WIDGET_CONTRACT_VERSION, TOPOLO_WIDGET_ENDPOINT, TOPOLO_WIDGET_OUTPUT_SCHEMA, TOPOLO_WIDGET_REFRESH_INTERVAL_MS, type TokenResponse, type Topolo, type TopoloActionAgentContract, type TopoloActionCatalogEntry, type TopoloActionCatalogSummary, type TopoloActionDigestInput, type TopoloActionPlan, type TopoloActionPreparation, type TopoloActionUploadOptions, type TopoloActionValidationIssue, type TopoloActionValidationResult, type TopoloActionsWidget, type TopoloActivityWidget, type TopoloAgentExecutionContext, type TopoloApiKeyResourceMetadata, TopoloAuthError, type TopoloBinaryResponse, type TopoloBindableResource, type TopoloBindableResourceCatalog, type TopoloChartWidget, TopoloClient, type TopoloClientOptions, TopoloConfirmationRequiredError, type TopoloCredential, type TopoloDebugEvent, TopoloHttpError, type TopoloInlineBase64UploadContract, type TopoloJsonSchema, type TopoloNotificationsWidget, TopoloOAuth, TopoloPermissionError, type TopoloRuntimeEnvironment, TopoloSdkError, type TopoloServiceCatalogEntry, type TopoloStatsWidget, type TopoloWidget, type TopoloWidgetAccessibility, type TopoloWidgetActionBinding, type TopoloWidgetActionRecovery, type TopoloWidgetActivityItem, type TopoloWidgetApiError, type TopoloWidgetApiErrorResponse, type TopoloWidgetApiResponse, type TopoloWidgetApiSuccessResponse, type TopoloWidgetBase, type TopoloWidgetConfig, type TopoloWidgetConfiguration, type TopoloWidgetConfigurationField, type TopoloWidgetConfigurationOption, type TopoloWidgetContext, type TopoloWidgetContribution, type TopoloWidgetDatasetDefinition, type TopoloWidgetDimension, type TopoloWidgetDimensionDefinition, type TopoloWidgetDraft, type TopoloWidgetDrilldown, type TopoloWidgetErrorResponseOptions, type TopoloWidgetEventDefinition, type TopoloWidgetLifecycleStage, type TopoloWidgetLocalization, type TopoloWidgetMetric, type TopoloWidgetMetricAggregation, type TopoloWidgetMetricComparison, type TopoloWidgetMetricDefinition, type TopoloWidgetMetricSemantic, type TopoloWidgetNotificationItem, type TopoloWidgetPeriod, type TopoloWidgetPresentation, type TopoloWidgetRefreshPolicy, type TopoloWidgetResourceBinding, type TopoloWidgetResponseOptions, type TopoloWidgetSeries, type TopoloWidgetSeriesDefinition, type TopoloWidgetSeriesPoint, type TopoloWidgetSize, type TopoloWidgetState, type TopoloWidgetStatus, type TopoloWidgetType, type TopoloWidgetValidationResult, type TopoloWidgetVisualizationFamily, type TopoloWidgetWorkspaceSelector, type TopoloWorkspace, type TopoloWorkspaceListResult, type TopoloWorkspaceMutationResult, type TopoloWorkspacePolicy, WorkspacesModule, actionContractCompleteness, applicationEntryFromCatalog, assertTopoloServiceUrlEnvironment, canonicalJson, canonicalTopoloErrorCode, canonicalTopoloRequestId, canonicalTopoloRequired, canonicalTopoloRetryAfter, canonicalizeActorEnvelope, compactActionCatalogEntry, compactActionPlan, compactActionPreparation, compactActionResult, compactActionValidation, createTopolo, createTopoloAgentExecutionContext, createTopoloWidgetError, createTopoloWidgetResponse, decodeActorEnvelopeHeader, defineTopoloActionsWidget, defineTopoloActivityWidget, defineTopoloChartWidget, defineTopoloNotificationsWidget, defineTopoloStatsWidget, digestTopoloActionCatalog, encodeActorEnvelopeHeader, encodeTopoloActionBase64, enrichActionContract, extractTopoloServiceErrorCode, extractTopoloServiceErrorDetails, formatDirectoryApplicationIds, friendlyAppId, isTopoloWidgetOutputSchema, listApplicationDirectory, parseActorEnvelope, parseTopoloActionUploadContract, preferExactActionMatches, prepareTopoloActionBase64UploadInput, prepareTopoloActionUploadInput, publicTopoloErrorMessage, resolveApplicationDirectoryEntry, resolveCatalogServiceUrl, resolveServiceUrl, sha256CanonicalValue, topoloErrorHint, topoloServiceOrigins, validateTopoloActionInput, validateTopoloWidgetResponse };
|