@evomap/evolver-adapter-public 2.0.46 → 2.0.47
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/hubCapability.d.ts +1 -0
- package/dist/hubCapability.js +9 -0
- package/dist/hubFetch.d.ts +1 -0
- package/dist/hubFetch.js +3 -1
- package/dist/triggerFeedback.d.ts +3 -0
- package/dist/triggerFeedback.js +19 -0
- package/dist/wireMap.js +2 -0
- package/package.json +2 -2
package/dist/hubCapability.d.ts
CHANGED
|
@@ -155,6 +155,7 @@ export declare class PublicHubCapability implements hub.HubCapability {
|
|
|
155
155
|
private lastMalformedPublish2xxAt;
|
|
156
156
|
private lastMalformedPublish2xxStatus;
|
|
157
157
|
readonly auth: hub.AuthProvider;
|
|
158
|
+
readonly triggerFeedback: hub.TriggerFeedbackCapability;
|
|
158
159
|
readonly recipes: hub.RecipeCapability;
|
|
159
160
|
constructor(opts: PublicHubOptions);
|
|
160
161
|
private evolverVersionForWire;
|
package/dist/hubCapability.js
CHANGED
|
@@ -7,6 +7,7 @@ import { antiAbuseTelemetryMode, buildHeartbeatAntiAbuseTelemetry, } from './ant
|
|
|
7
7
|
import { getWorkspaceKeychainMode } from './auth/workspaceKeychain.js';
|
|
8
8
|
import { agentDirectoryFailure, parsePublicAgentPage, parsePublicAgentProfile, paginatePublicAgentPage, mergePublicAgentPages, publicAgentSearchQuery, publicTaskDiscoveryQuery, PUBLIC_TASK_DISCOVERY_MAX_CANDIDATES, unsupportedPublicAvailability, unsupportedPublicSort, withDirectoryTimeout, } from './agentDirectory.js';
|
|
9
9
|
import { createRecipeExecution } from './recipeExecution.js';
|
|
10
|
+
import { createTriggerFeedbackCapability } from './triggerFeedback.js';
|
|
10
11
|
import { assetMatchesId, stripHubDeliveryMetadataForIntegrity } from './hubReuse.js';
|
|
11
12
|
import { OAuthAuthenticationPreflightError, OAuthCredentialBindingError } from './auth/oauthDeviceToken.js';
|
|
12
13
|
export const INBOUND_LIMIT = 100;
|
|
@@ -104,6 +105,7 @@ export class PublicHubCapability {
|
|
|
104
105
|
lastMalformedPublish2xxAt;
|
|
105
106
|
lastMalformedPublish2xxStatus;
|
|
106
107
|
auth;
|
|
108
|
+
triggerFeedback;
|
|
107
109
|
recipes = {
|
|
108
110
|
create: async (request) => this.createRecipe(request),
|
|
109
111
|
publish: async (recipeId, options) => this.publishRecipe(recipeId, options),
|
|
@@ -117,6 +119,13 @@ export class PublicHubCapability {
|
|
|
117
119
|
this.auth = opts.auth;
|
|
118
120
|
this.http = new HubFetch({ baseUrl: opts.baseUrl, auth: opts.auth, fetchFn: opts.fetchFn, senderId: opts.senderId });
|
|
119
121
|
this.recipes.execution = createRecipeExecution(opts);
|
|
122
|
+
this.triggerFeedback = createTriggerFeedbackCapability(async (method, path, body) => {
|
|
123
|
+
if (!this.opts.senderId()?.trim())
|
|
124
|
+
throw new Error('trigger_feedback_node_unbound');
|
|
125
|
+
if (!reference.isExecutionEligible(body, this.referenceScope))
|
|
126
|
+
throw new Error('reference_not_execution_evidence');
|
|
127
|
+
return this.http.call(method, path, body);
|
|
128
|
+
});
|
|
120
129
|
}
|
|
121
130
|
evolverVersionForWire(explicitVersion) {
|
|
122
131
|
const antiAbuse = this.opts.antiAbuse;
|
package/dist/hubFetch.d.ts
CHANGED
|
@@ -111,6 +111,7 @@ export declare class HubFetch {
|
|
|
111
111
|
call<T>(method: string, path: string, bodyObj?: Record<string, unknown>, query?: Record<string, string | number | undefined>, requestHeaders?: Readonly<Record<string, string>>): Promise<T>;
|
|
112
112
|
}
|
|
113
113
|
export declare function resolveHubOperationTimeouts(env?: Record<string, string | undefined>, overrides?: Partial<HubOperationTimeouts>): HubOperationTimeouts;
|
|
114
|
+
export declare function awaitWithAbort<T>(promise: PromiseLike<T>, signal?: AbortSignal): Promise<T>;
|
|
114
115
|
export declare function hubResponseContentType(res: Pick<HubFetchResponse, 'headers'> | undefined): string;
|
|
115
116
|
export declare function isHubApiResponse(res: Pick<HubFetchResponse, 'headers'> | undefined): boolean;
|
|
116
117
|
export declare function hubUnreachableBackoffMs(failureCount: number): number;
|
package/dist/hubFetch.js
CHANGED
|
@@ -102,6 +102,8 @@ const LEGACY_BEARER_POST_PATHS = new Set([
|
|
|
102
102
|
'/a2a/fetch',
|
|
103
103
|
'/a2a/events/poll',
|
|
104
104
|
'/a2a/mailbox/outbound',
|
|
105
|
+
'/a2a/trigger-feedback',
|
|
106
|
+
'/a2a/trigger-feedback/get',
|
|
105
107
|
]);
|
|
106
108
|
function requestHeaderName(headers, name) {
|
|
107
109
|
const normalized = name.toLowerCase();
|
|
@@ -352,7 +354,7 @@ function abortReason(signal) {
|
|
|
352
354
|
error.name = 'AbortError';
|
|
353
355
|
return error;
|
|
354
356
|
}
|
|
355
|
-
async function awaitWithAbort(promise, signal) {
|
|
357
|
+
export async function awaitWithAbort(promise, signal) {
|
|
356
358
|
const pending = Promise.resolve(promise);
|
|
357
359
|
if (!signal)
|
|
358
360
|
return await pending;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { hub } from '@evomap/evolver-core';
|
|
2
|
+
export type TriggerFeedbackHttp = (method: 'POST', path: string, body: Record<string, unknown>) => Promise<unknown>;
|
|
3
|
+
export declare function createTriggerFeedbackCapability(call: TriggerFeedbackHttp): hub.TriggerFeedbackCapability;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { hub } from '@evomap/evolver-core';
|
|
2
|
+
export function createTriggerFeedbackCapability(call) {
|
|
3
|
+
return {
|
|
4
|
+
async commit(report) {
|
|
5
|
+
const normalized = hub.normalizeTriggerFeedbackReport(report);
|
|
6
|
+
const raw = await call('POST', '/a2a/trigger-feedback', { ...normalized });
|
|
7
|
+
const receipt = hub.parseTriggerFeedbackReceipt(raw, normalized.run_id);
|
|
8
|
+
if (!hub.triggerFeedbackReceiptMatches(receipt, normalized))
|
|
9
|
+
throw new Error('trigger_feedback_receipt_unconfirmed');
|
|
10
|
+
return receipt;
|
|
11
|
+
},
|
|
12
|
+
async get(runId) {
|
|
13
|
+
if (!runId.trim() || Buffer.byteLength(runId) > 256)
|
|
14
|
+
throw new Error('trigger_feedback_invalid_identity');
|
|
15
|
+
const raw = await call('POST', '/a2a/trigger-feedback/get', { run_id: runId });
|
|
16
|
+
return hub.parseTriggerFeedbackReceipt(raw, runId);
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
}
|
package/dist/wireMap.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evomap/evolver-adapter-public",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.47",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@evomap/atp-sdk": "^0.1.0",
|
|
20
|
-
"@evomap/evolver-core": "2.0.
|
|
20
|
+
"@evomap/evolver-core": "2.0.47",
|
|
21
21
|
"undici": "^6.29.1"
|
|
22
22
|
},
|
|
23
23
|
"optionalDependencies": {
|