@contractspec/lib.ai-agent 1.62.0 → 2.0.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/dist/agent/agent-factory.d.ts +0 -1
- package/dist/agent/agent-factory.js +41 -6
- package/dist/agent/agent.test.d.ts +0 -1
- package/dist/agent/contract-spec-agent.d.ts +0 -1
- package/dist/agent/contract-spec-agent.js +41 -6
- package/dist/agent/index.d.ts +0 -1
- package/dist/agent/index.js +43 -8
- package/dist/agent/json-runner.d.ts +0 -1
- package/dist/agent/json-runner.js +42 -7
- package/dist/agent/json-runner.test.d.ts +0 -1
- package/dist/agent/unified-agent.d.ts +0 -1
- package/dist/agent/unified-agent.js +42 -7
- package/dist/approval/index.d.ts +0 -1
- package/dist/approval/index.js +31 -5
- package/dist/approval/workflow.d.ts +7 -2
- package/dist/approval/workflow.js +31 -5
- package/dist/exporters/claude-agent-exporter.d.ts +0 -1
- package/dist/exporters/claude-agent-exporter.js +4 -4
- package/dist/exporters/index.d.ts +0 -1
- package/dist/exporters/index.js +4 -4
- package/dist/exporters/opencode-exporter.d.ts +0 -1
- package/dist/exporters/opencode-exporter.js +4 -4
- package/dist/exporters/types.d.ts +0 -1
- package/dist/i18n/catalogs/en.d.ts +1 -2
- package/dist/i18n/catalogs/en.js +1 -1
- package/dist/i18n/catalogs/es.d.ts +1 -2
- package/dist/i18n/catalogs/es.js +1 -1
- package/dist/i18n/catalogs/fr.d.ts +1 -2
- package/dist/i18n/catalogs/fr.js +1 -1
- package/dist/i18n/catalogs/index.d.ts +0 -1
- package/dist/i18n/catalogs/index.js +3 -3
- package/dist/i18n/i18n.test.d.ts +0 -1
- package/dist/i18n/index.d.ts +0 -1
- package/dist/i18n/index.js +4 -4
- package/dist/i18n/keys.d.ts +0 -1
- package/dist/i18n/locale.d.ts +0 -1
- package/dist/i18n/messages.d.ts +1 -2
- package/dist/i18n/messages.js +4 -4
- package/dist/index.d.ts +0 -14
- package/dist/index.js +6 -3523
- package/dist/interop/index.d.ts +0 -1
- package/dist/interop/index.js +4 -4
- package/dist/interop/spec-consumer.d.ts +0 -1
- package/dist/interop/spec-consumer.js +4 -4
- package/dist/interop/tool-consumer.d.ts +0 -1
- package/dist/interop/tool-consumer.js +4 -4
- package/dist/interop/types.d.ts +0 -1
- package/dist/knowledge/index.d.ts +0 -1
- package/dist/knowledge/index.js +4 -4
- package/dist/knowledge/injector.d.ts +0 -1
- package/dist/knowledge/injector.js +4 -4
- package/dist/memory/in-memory.d.ts +0 -1
- package/dist/memory/index.d.ts +0 -1
- package/dist/memory/manager.d.ts +0 -1
- package/dist/memory/memory.test.d.ts +0 -1
- package/dist/node/agent/agent-factory.js +41 -6
- package/dist/node/agent/contract-spec-agent.js +41 -6
- package/dist/node/agent/index.js +43 -8
- package/dist/node/agent/json-runner.js +42 -7
- package/dist/node/agent/unified-agent.js +42 -7
- package/dist/node/approval/index.js +31 -5
- package/dist/node/approval/workflow.js +31 -5
- package/dist/node/exporters/claude-agent-exporter.js +4 -4
- package/dist/node/exporters/index.js +4 -4
- package/dist/node/exporters/opencode-exporter.js +4 -4
- package/dist/node/i18n/catalogs/en.js +1 -1
- package/dist/node/i18n/catalogs/es.js +1 -1
- package/dist/node/i18n/catalogs/fr.js +1 -1
- package/dist/node/i18n/catalogs/index.js +3 -3
- package/dist/node/i18n/index.js +4 -4
- package/dist/node/i18n/messages.js +4 -4
- package/dist/node/index.js +6 -3523
- package/dist/node/interop/index.js +4 -4
- package/dist/node/interop/spec-consumer.js +4 -4
- package/dist/node/interop/tool-consumer.js +4 -4
- package/dist/node/knowledge/index.js +4 -4
- package/dist/node/knowledge/injector.js +4 -4
- package/dist/node/providers/claude-agent-sdk/adapter.js +4 -4
- package/dist/node/providers/claude-agent-sdk/index.js +4 -4
- package/dist/node/providers/claude-agent-sdk/tool-bridge.js +4 -4
- package/dist/node/providers/index.js +4 -4
- package/dist/node/providers/opencode-sdk/adapter.js +4 -4
- package/dist/node/providers/opencode-sdk/agent-bridge.js +4 -4
- package/dist/node/providers/opencode-sdk/index.js +4 -4
- package/dist/node/providers/opencode-sdk/tool-bridge.js +4 -4
- package/dist/node/providers/registry.js +4 -4
- package/dist/node/session/index.js +37 -2
- package/dist/node/session/store.js +37 -2
- package/dist/node/spec/index.js +5 -5
- package/dist/node/spec/registry.js +5 -5
- package/dist/node/spec/spec.js +4 -4
- package/dist/node/tools/index.js +4 -4
- package/dist/node/tools/knowledge-tool.js +4 -4
- package/dist/node/tools/mcp-server.js +4 -4
- package/dist/node/tools/tool-adapter.js +4 -4
- package/dist/providers/claude-agent-sdk/adapter.d.ts +0 -1
- package/dist/providers/claude-agent-sdk/adapter.js +4 -4
- package/dist/providers/claude-agent-sdk/index.d.ts +0 -1
- package/dist/providers/claude-agent-sdk/index.js +4 -4
- package/dist/providers/claude-agent-sdk/session-bridge.d.ts +0 -1
- package/dist/providers/claude-agent-sdk/tool-bridge.d.ts +0 -1
- package/dist/providers/claude-agent-sdk/tool-bridge.js +4 -4
- package/dist/providers/index.d.ts +0 -1
- package/dist/providers/index.js +4 -4
- package/dist/providers/opencode-sdk/adapter.d.ts +0 -1
- package/dist/providers/opencode-sdk/adapter.js +4 -4
- package/dist/providers/opencode-sdk/agent-bridge.d.ts +0 -1
- package/dist/providers/opencode-sdk/agent-bridge.js +4 -4
- package/dist/providers/opencode-sdk/index.d.ts +0 -1
- package/dist/providers/opencode-sdk/index.js +4 -4
- package/dist/providers/opencode-sdk/tool-bridge.d.ts +0 -1
- package/dist/providers/opencode-sdk/tool-bridge.js +4 -4
- package/dist/providers/registry.d.ts +0 -1
- package/dist/providers/registry.js +4 -4
- package/dist/providers/types.d.ts +0 -1
- package/dist/schema/index.d.ts +0 -1
- package/dist/schema/json-schema-to-zod.d.ts +0 -1
- package/dist/schema/schema-output.d.ts +0 -1
- package/dist/session/index.d.ts +0 -1
- package/dist/session/index.js +37 -2
- package/dist/session/store.d.ts +12 -2
- package/dist/session/store.js +37 -2
- package/dist/spec/index.d.ts +0 -1
- package/dist/spec/index.js +5 -5
- package/dist/spec/registry.d.ts +1 -2
- package/dist/spec/registry.js +5 -5
- package/dist/spec/spec.d.ts +3 -4
- package/dist/spec/spec.js +4 -4
- package/dist/telemetry/adapter.d.ts +0 -1
- package/dist/telemetry/index.d.ts +0 -1
- package/dist/telemetry/posthog-types.d.ts +0 -1
- package/dist/telemetry/posthog.d.ts +0 -1
- package/dist/telemetry/posthog.test.d.ts +0 -1
- package/dist/tools/index.d.ts +0 -1
- package/dist/tools/index.js +4 -4
- package/dist/tools/knowledge-tool.d.ts +0 -1
- package/dist/tools/knowledge-tool.js +4 -4
- package/dist/tools/mcp-client.d.ts +0 -1
- package/dist/tools/mcp-server.d.ts +0 -1
- package/dist/tools/mcp-server.js +4 -4
- package/dist/tools/tool-adapter.d.ts +0 -1
- package/dist/tools/tool-adapter.js +4 -4
- package/dist/tools/tools.test.d.ts +0 -1
- package/dist/types.d.ts +0 -1
- package/package.json +12 -12
- package/dist/agent/agent-factory.d.ts.map +0 -1
- package/dist/agent/agent.test.d.ts.map +0 -1
- package/dist/agent/contract-spec-agent.d.ts.map +0 -1
- package/dist/agent/index.d.ts.map +0 -1
- package/dist/agent/json-runner.d.ts.map +0 -1
- package/dist/agent/json-runner.test.d.ts.map +0 -1
- package/dist/agent/unified-agent.d.ts.map +0 -1
- package/dist/approval/index.d.ts.map +0 -1
- package/dist/approval/workflow.d.ts.map +0 -1
- package/dist/exporters/claude-agent-exporter.d.ts.map +0 -1
- package/dist/exporters/index.d.ts.map +0 -1
- package/dist/exporters/opencode-exporter.d.ts.map +0 -1
- package/dist/exporters/types.d.ts.map +0 -1
- package/dist/i18n/catalogs/en.d.ts.map +0 -1
- package/dist/i18n/catalogs/es.d.ts.map +0 -1
- package/dist/i18n/catalogs/fr.d.ts.map +0 -1
- package/dist/i18n/catalogs/index.d.ts.map +0 -1
- package/dist/i18n/i18n.test.d.ts.map +0 -1
- package/dist/i18n/index.d.ts.map +0 -1
- package/dist/i18n/keys.d.ts.map +0 -1
- package/dist/i18n/locale.d.ts.map +0 -1
- package/dist/i18n/messages.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/interop/index.d.ts.map +0 -1
- package/dist/interop/spec-consumer.d.ts.map +0 -1
- package/dist/interop/tool-consumer.d.ts.map +0 -1
- package/dist/interop/types.d.ts.map +0 -1
- package/dist/knowledge/index.d.ts.map +0 -1
- package/dist/knowledge/injector.d.ts.map +0 -1
- package/dist/memory/in-memory.d.ts.map +0 -1
- package/dist/memory/index.d.ts.map +0 -1
- package/dist/memory/manager.d.ts.map +0 -1
- package/dist/memory/memory.test.d.ts.map +0 -1
- package/dist/providers/claude-agent-sdk/adapter.d.ts.map +0 -1
- package/dist/providers/claude-agent-sdk/index.d.ts.map +0 -1
- package/dist/providers/claude-agent-sdk/session-bridge.d.ts.map +0 -1
- package/dist/providers/claude-agent-sdk/tool-bridge.d.ts.map +0 -1
- package/dist/providers/index.d.ts.map +0 -1
- package/dist/providers/opencode-sdk/adapter.d.ts.map +0 -1
- package/dist/providers/opencode-sdk/agent-bridge.d.ts.map +0 -1
- package/dist/providers/opencode-sdk/index.d.ts.map +0 -1
- package/dist/providers/opencode-sdk/tool-bridge.d.ts.map +0 -1
- package/dist/providers/registry.d.ts.map +0 -1
- package/dist/providers/types.d.ts.map +0 -1
- package/dist/schema/index.d.ts.map +0 -1
- package/dist/schema/json-schema-to-zod.d.ts.map +0 -1
- package/dist/schema/schema-output.d.ts.map +0 -1
- package/dist/session/index.d.ts.map +0 -1
- package/dist/session/store.d.ts.map +0 -1
- package/dist/spec/index.d.ts.map +0 -1
- package/dist/spec/registry.d.ts.map +0 -1
- package/dist/spec/spec.d.ts.map +0 -1
- package/dist/telemetry/adapter.d.ts.map +0 -1
- package/dist/telemetry/index.d.ts.map +0 -1
- package/dist/telemetry/posthog-types.d.ts.map +0 -1
- package/dist/telemetry/posthog.d.ts.map +0 -1
- package/dist/telemetry/posthog.test.d.ts.map +0 -1
- package/dist/tools/index.d.ts.map +0 -1
- package/dist/tools/knowledge-tool.d.ts.map +0 -1
- package/dist/tools/mcp-client.d.ts.map +0 -1
- package/dist/tools/mcp-server.d.ts.map +0 -1
- package/dist/tools/tool-adapter.d.ts.map +0 -1
- package/dist/tools/tools.test.d.ts.map +0 -1
- package/dist/types.d.ts.map +0 -1
package/dist/approval/index.js
CHANGED
|
@@ -13,7 +13,7 @@ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
|
13
13
|
var __require = import.meta.require;
|
|
14
14
|
|
|
15
15
|
// src/i18n/catalogs/en.ts
|
|
16
|
-
import { defineTranslation } from "@contractspec/lib.contracts/translations";
|
|
16
|
+
import { defineTranslation } from "@contractspec/lib.contracts-spec/translations";
|
|
17
17
|
var enMessages;
|
|
18
18
|
var init_en = __esm(() => {
|
|
19
19
|
enMessages = defineTranslation({
|
|
@@ -609,7 +609,7 @@ var init_en = __esm(() => {
|
|
|
609
609
|
});
|
|
610
610
|
|
|
611
611
|
// src/i18n/catalogs/fr.ts
|
|
612
|
-
import { defineTranslation as defineTranslation2 } from "@contractspec/lib.contracts/translations";
|
|
612
|
+
import { defineTranslation as defineTranslation2 } from "@contractspec/lib.contracts-spec/translations";
|
|
613
613
|
var frMessages;
|
|
614
614
|
var init_fr = __esm(() => {
|
|
615
615
|
frMessages = defineTranslation2({
|
|
@@ -1220,7 +1220,7 @@ var init_fr = __esm(() => {
|
|
|
1220
1220
|
});
|
|
1221
1221
|
|
|
1222
1222
|
// src/i18n/catalogs/es.ts
|
|
1223
|
-
import { defineTranslation as defineTranslation3 } from "@contractspec/lib.contracts/translations";
|
|
1223
|
+
import { defineTranslation as defineTranslation3 } from "@contractspec/lib.contracts-spec/translations";
|
|
1224
1224
|
var esMessages;
|
|
1225
1225
|
var init_es = __esm(() => {
|
|
1226
1226
|
esMessages = defineTranslation3({
|
|
@@ -1885,7 +1885,7 @@ var init_locale = __esm(() => {
|
|
|
1885
1885
|
});
|
|
1886
1886
|
|
|
1887
1887
|
// src/i18n/messages.ts
|
|
1888
|
-
import { TranslationRegistry } from "@contractspec/lib.contracts/translations";
|
|
1888
|
+
import { TranslationRegistry } from "@contractspec/lib.contracts-spec/translations";
|
|
1889
1889
|
function getRegistry() {
|
|
1890
1890
|
if (!sharedRegistry) {
|
|
1891
1891
|
sharedRegistry = new TranslationRegistry([
|
|
@@ -2109,7 +2109,12 @@ import { randomUUID } from "crypto";
|
|
|
2109
2109
|
|
|
2110
2110
|
class InMemoryApprovalStore {
|
|
2111
2111
|
items = new Map;
|
|
2112
|
+
maxItems;
|
|
2113
|
+
constructor(options = {}) {
|
|
2114
|
+
this.maxItems = options.maxItems ?? 1000;
|
|
2115
|
+
}
|
|
2112
2116
|
async create(request) {
|
|
2117
|
+
this.evictIfNeeded();
|
|
2113
2118
|
this.items.set(request.id, request);
|
|
2114
2119
|
}
|
|
2115
2120
|
async get(id) {
|
|
@@ -2145,6 +2150,23 @@ class InMemoryApprovalStore {
|
|
|
2145
2150
|
clear() {
|
|
2146
2151
|
this.items.clear();
|
|
2147
2152
|
}
|
|
2153
|
+
evictIfNeeded() {
|
|
2154
|
+
if (this.items.size < this.maxItems) {
|
|
2155
|
+
return;
|
|
2156
|
+
}
|
|
2157
|
+
let oldestId = null;
|
|
2158
|
+
let oldestTimestamp = Number.POSITIVE_INFINITY;
|
|
2159
|
+
for (const [id, request] of this.items.entries()) {
|
|
2160
|
+
const ts = request.requestedAt.getTime();
|
|
2161
|
+
if (ts < oldestTimestamp) {
|
|
2162
|
+
oldestTimestamp = ts;
|
|
2163
|
+
oldestId = id;
|
|
2164
|
+
}
|
|
2165
|
+
}
|
|
2166
|
+
if (oldestId) {
|
|
2167
|
+
this.items.delete(oldestId);
|
|
2168
|
+
}
|
|
2169
|
+
}
|
|
2148
2170
|
}
|
|
2149
2171
|
|
|
2150
2172
|
class ApprovalWorkflow {
|
|
@@ -2214,7 +2236,11 @@ class ApprovalWorkflow {
|
|
|
2214
2236
|
}
|
|
2215
2237
|
}
|
|
2216
2238
|
function createApprovalWorkflow(store) {
|
|
2217
|
-
|
|
2239
|
+
if (store && typeof store === "object" && "create" in store && typeof store.create === "function") {
|
|
2240
|
+
return new ApprovalWorkflow(store);
|
|
2241
|
+
}
|
|
2242
|
+
const options = store;
|
|
2243
|
+
return new ApprovalWorkflow(new InMemoryApprovalStore(options));
|
|
2218
2244
|
}
|
|
2219
2245
|
export {
|
|
2220
2246
|
createApprovalWorkflow,
|
|
@@ -50,11 +50,16 @@ export interface ApprovalStore {
|
|
|
50
50
|
tenantId?: string;
|
|
51
51
|
}): Promise<ApprovalRequest[]>;
|
|
52
52
|
}
|
|
53
|
+
export interface InMemoryApprovalStoreOptions {
|
|
54
|
+
maxItems?: number;
|
|
55
|
+
}
|
|
53
56
|
/**
|
|
54
57
|
* In-memory approval store for development and testing.
|
|
55
58
|
*/
|
|
56
59
|
export declare class InMemoryApprovalStore implements ApprovalStore {
|
|
57
60
|
private readonly items;
|
|
61
|
+
private readonly maxItems;
|
|
62
|
+
constructor(options?: InMemoryApprovalStoreOptions);
|
|
58
63
|
create(request: ApprovalRequest): Promise<void>;
|
|
59
64
|
get(id: string): Promise<ApprovalRequest | null>;
|
|
60
65
|
getByToolCallId(toolCallId: string): Promise<ApprovalRequest | null>;
|
|
@@ -65,6 +70,7 @@ export declare class InMemoryApprovalStore implements ApprovalStore {
|
|
|
65
70
|
tenantId?: string;
|
|
66
71
|
}): Promise<ApprovalRequest[]>;
|
|
67
72
|
clear(): void;
|
|
73
|
+
private evictIfNeeded;
|
|
68
74
|
}
|
|
69
75
|
/**
|
|
70
76
|
* Approval workflow for managing tool execution approvals.
|
|
@@ -148,5 +154,4 @@ export declare class ApprovalWorkflow {
|
|
|
148
154
|
/**
|
|
149
155
|
* Create an approval workflow instance.
|
|
150
156
|
*/
|
|
151
|
-
export declare function createApprovalWorkflow(store?: ApprovalStore): ApprovalWorkflow;
|
|
152
|
-
//# sourceMappingURL=workflow.d.ts.map
|
|
157
|
+
export declare function createApprovalWorkflow(store?: ApprovalStore | InMemoryApprovalStoreOptions): ApprovalWorkflow;
|
|
@@ -13,7 +13,7 @@ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
|
13
13
|
var __require = import.meta.require;
|
|
14
14
|
|
|
15
15
|
// src/i18n/catalogs/en.ts
|
|
16
|
-
import { defineTranslation } from "@contractspec/lib.contracts/translations";
|
|
16
|
+
import { defineTranslation } from "@contractspec/lib.contracts-spec/translations";
|
|
17
17
|
var enMessages;
|
|
18
18
|
var init_en = __esm(() => {
|
|
19
19
|
enMessages = defineTranslation({
|
|
@@ -609,7 +609,7 @@ var init_en = __esm(() => {
|
|
|
609
609
|
});
|
|
610
610
|
|
|
611
611
|
// src/i18n/catalogs/fr.ts
|
|
612
|
-
import { defineTranslation as defineTranslation2 } from "@contractspec/lib.contracts/translations";
|
|
612
|
+
import { defineTranslation as defineTranslation2 } from "@contractspec/lib.contracts-spec/translations";
|
|
613
613
|
var frMessages;
|
|
614
614
|
var init_fr = __esm(() => {
|
|
615
615
|
frMessages = defineTranslation2({
|
|
@@ -1220,7 +1220,7 @@ var init_fr = __esm(() => {
|
|
|
1220
1220
|
});
|
|
1221
1221
|
|
|
1222
1222
|
// src/i18n/catalogs/es.ts
|
|
1223
|
-
import { defineTranslation as defineTranslation3 } from "@contractspec/lib.contracts/translations";
|
|
1223
|
+
import { defineTranslation as defineTranslation3 } from "@contractspec/lib.contracts-spec/translations";
|
|
1224
1224
|
var esMessages;
|
|
1225
1225
|
var init_es = __esm(() => {
|
|
1226
1226
|
esMessages = defineTranslation3({
|
|
@@ -1885,7 +1885,7 @@ var init_locale = __esm(() => {
|
|
|
1885
1885
|
});
|
|
1886
1886
|
|
|
1887
1887
|
// src/i18n/messages.ts
|
|
1888
|
-
import { TranslationRegistry } from "@contractspec/lib.contracts/translations";
|
|
1888
|
+
import { TranslationRegistry } from "@contractspec/lib.contracts-spec/translations";
|
|
1889
1889
|
function getRegistry() {
|
|
1890
1890
|
if (!sharedRegistry) {
|
|
1891
1891
|
sharedRegistry = new TranslationRegistry([
|
|
@@ -2109,7 +2109,12 @@ import { randomUUID } from "crypto";
|
|
|
2109
2109
|
|
|
2110
2110
|
class InMemoryApprovalStore {
|
|
2111
2111
|
items = new Map;
|
|
2112
|
+
maxItems;
|
|
2113
|
+
constructor(options = {}) {
|
|
2114
|
+
this.maxItems = options.maxItems ?? 1000;
|
|
2115
|
+
}
|
|
2112
2116
|
async create(request) {
|
|
2117
|
+
this.evictIfNeeded();
|
|
2113
2118
|
this.items.set(request.id, request);
|
|
2114
2119
|
}
|
|
2115
2120
|
async get(id) {
|
|
@@ -2145,6 +2150,23 @@ class InMemoryApprovalStore {
|
|
|
2145
2150
|
clear() {
|
|
2146
2151
|
this.items.clear();
|
|
2147
2152
|
}
|
|
2153
|
+
evictIfNeeded() {
|
|
2154
|
+
if (this.items.size < this.maxItems) {
|
|
2155
|
+
return;
|
|
2156
|
+
}
|
|
2157
|
+
let oldestId = null;
|
|
2158
|
+
let oldestTimestamp = Number.POSITIVE_INFINITY;
|
|
2159
|
+
for (const [id, request] of this.items.entries()) {
|
|
2160
|
+
const ts = request.requestedAt.getTime();
|
|
2161
|
+
if (ts < oldestTimestamp) {
|
|
2162
|
+
oldestTimestamp = ts;
|
|
2163
|
+
oldestId = id;
|
|
2164
|
+
}
|
|
2165
|
+
}
|
|
2166
|
+
if (oldestId) {
|
|
2167
|
+
this.items.delete(oldestId);
|
|
2168
|
+
}
|
|
2169
|
+
}
|
|
2148
2170
|
}
|
|
2149
2171
|
|
|
2150
2172
|
class ApprovalWorkflow {
|
|
@@ -2214,7 +2236,11 @@ class ApprovalWorkflow {
|
|
|
2214
2236
|
}
|
|
2215
2237
|
}
|
|
2216
2238
|
function createApprovalWorkflow(store) {
|
|
2217
|
-
|
|
2239
|
+
if (store && typeof store === "object" && "create" in store && typeof store.create === "function") {
|
|
2240
|
+
return new ApprovalWorkflow(store);
|
|
2241
|
+
}
|
|
2242
|
+
const options = store;
|
|
2243
|
+
return new ApprovalWorkflow(new InMemoryApprovalStore(options));
|
|
2218
2244
|
}
|
|
2219
2245
|
export {
|
|
2220
2246
|
createApprovalWorkflow,
|
|
@@ -13,7 +13,7 @@ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
|
13
13
|
var __require = import.meta.require;
|
|
14
14
|
|
|
15
15
|
// src/i18n/catalogs/en.ts
|
|
16
|
-
import { defineTranslation } from "@contractspec/lib.contracts/translations";
|
|
16
|
+
import { defineTranslation } from "@contractspec/lib.contracts-spec/translations";
|
|
17
17
|
var enMessages;
|
|
18
18
|
var init_en = __esm(() => {
|
|
19
19
|
enMessages = defineTranslation({
|
|
@@ -609,7 +609,7 @@ var init_en = __esm(() => {
|
|
|
609
609
|
});
|
|
610
610
|
|
|
611
611
|
// src/i18n/catalogs/fr.ts
|
|
612
|
-
import { defineTranslation as defineTranslation2 } from "@contractspec/lib.contracts/translations";
|
|
612
|
+
import { defineTranslation as defineTranslation2 } from "@contractspec/lib.contracts-spec/translations";
|
|
613
613
|
var frMessages;
|
|
614
614
|
var init_fr = __esm(() => {
|
|
615
615
|
frMessages = defineTranslation2({
|
|
@@ -1220,7 +1220,7 @@ var init_fr = __esm(() => {
|
|
|
1220
1220
|
});
|
|
1221
1221
|
|
|
1222
1222
|
// src/i18n/catalogs/es.ts
|
|
1223
|
-
import { defineTranslation as defineTranslation3 } from "@contractspec/lib.contracts/translations";
|
|
1223
|
+
import { defineTranslation as defineTranslation3 } from "@contractspec/lib.contracts-spec/translations";
|
|
1224
1224
|
var esMessages;
|
|
1225
1225
|
var init_es = __esm(() => {
|
|
1226
1226
|
esMessages = defineTranslation3({
|
|
@@ -1885,7 +1885,7 @@ var init_locale = __esm(() => {
|
|
|
1885
1885
|
});
|
|
1886
1886
|
|
|
1887
1887
|
// src/i18n/messages.ts
|
|
1888
|
-
import { TranslationRegistry } from "@contractspec/lib.contracts/translations";
|
|
1888
|
+
import { TranslationRegistry } from "@contractspec/lib.contracts-spec/translations";
|
|
1889
1889
|
function getRegistry() {
|
|
1890
1890
|
if (!sharedRegistry) {
|
|
1891
1891
|
sharedRegistry = new TranslationRegistry([
|
|
@@ -25,4 +25,3 @@
|
|
|
25
25
|
export * from './types';
|
|
26
26
|
export { ClaudeAgentExporter, exportToClaudeAgent, generateClaudeMd, validateForClaudeAgent, } from './claude-agent-exporter';
|
|
27
27
|
export { OpenCodeExporter, exportToOpenCode, generateOpenCodeMarkdown, generateOpenCodeJSON, validateForOpenCode, } from './opencode-exporter';
|
|
28
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/exporters/index.js
CHANGED
|
@@ -13,7 +13,7 @@ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
|
13
13
|
var __require = import.meta.require;
|
|
14
14
|
|
|
15
15
|
// src/i18n/catalogs/en.ts
|
|
16
|
-
import { defineTranslation } from "@contractspec/lib.contracts/translations";
|
|
16
|
+
import { defineTranslation } from "@contractspec/lib.contracts-spec/translations";
|
|
17
17
|
var enMessages;
|
|
18
18
|
var init_en = __esm(() => {
|
|
19
19
|
enMessages = defineTranslation({
|
|
@@ -609,7 +609,7 @@ var init_en = __esm(() => {
|
|
|
609
609
|
});
|
|
610
610
|
|
|
611
611
|
// src/i18n/catalogs/fr.ts
|
|
612
|
-
import { defineTranslation as defineTranslation2 } from "@contractspec/lib.contracts/translations";
|
|
612
|
+
import { defineTranslation as defineTranslation2 } from "@contractspec/lib.contracts-spec/translations";
|
|
613
613
|
var frMessages;
|
|
614
614
|
var init_fr = __esm(() => {
|
|
615
615
|
frMessages = defineTranslation2({
|
|
@@ -1220,7 +1220,7 @@ var init_fr = __esm(() => {
|
|
|
1220
1220
|
});
|
|
1221
1221
|
|
|
1222
1222
|
// src/i18n/catalogs/es.ts
|
|
1223
|
-
import { defineTranslation as defineTranslation3 } from "@contractspec/lib.contracts/translations";
|
|
1223
|
+
import { defineTranslation as defineTranslation3 } from "@contractspec/lib.contracts-spec/translations";
|
|
1224
1224
|
var esMessages;
|
|
1225
1225
|
var init_es = __esm(() => {
|
|
1226
1226
|
esMessages = defineTranslation3({
|
|
@@ -1885,7 +1885,7 @@ var init_locale = __esm(() => {
|
|
|
1885
1885
|
});
|
|
1886
1886
|
|
|
1887
1887
|
// src/i18n/messages.ts
|
|
1888
|
-
import { TranslationRegistry } from "@contractspec/lib.contracts/translations";
|
|
1888
|
+
import { TranslationRegistry } from "@contractspec/lib.contracts-spec/translations";
|
|
1889
1889
|
function getRegistry() {
|
|
1890
1890
|
if (!sharedRegistry) {
|
|
1891
1891
|
sharedRegistry = new TranslationRegistry([
|
|
@@ -13,7 +13,7 @@ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
|
13
13
|
var __require = import.meta.require;
|
|
14
14
|
|
|
15
15
|
// src/i18n/catalogs/en.ts
|
|
16
|
-
import { defineTranslation } from "@contractspec/lib.contracts/translations";
|
|
16
|
+
import { defineTranslation } from "@contractspec/lib.contracts-spec/translations";
|
|
17
17
|
var enMessages;
|
|
18
18
|
var init_en = __esm(() => {
|
|
19
19
|
enMessages = defineTranslation({
|
|
@@ -609,7 +609,7 @@ var init_en = __esm(() => {
|
|
|
609
609
|
});
|
|
610
610
|
|
|
611
611
|
// src/i18n/catalogs/fr.ts
|
|
612
|
-
import { defineTranslation as defineTranslation2 } from "@contractspec/lib.contracts/translations";
|
|
612
|
+
import { defineTranslation as defineTranslation2 } from "@contractspec/lib.contracts-spec/translations";
|
|
613
613
|
var frMessages;
|
|
614
614
|
var init_fr = __esm(() => {
|
|
615
615
|
frMessages = defineTranslation2({
|
|
@@ -1220,7 +1220,7 @@ var init_fr = __esm(() => {
|
|
|
1220
1220
|
});
|
|
1221
1221
|
|
|
1222
1222
|
// src/i18n/catalogs/es.ts
|
|
1223
|
-
import { defineTranslation as defineTranslation3 } from "@contractspec/lib.contracts/translations";
|
|
1223
|
+
import { defineTranslation as defineTranslation3 } from "@contractspec/lib.contracts-spec/translations";
|
|
1224
1224
|
var esMessages;
|
|
1225
1225
|
var init_es = __esm(() => {
|
|
1226
1226
|
esMessages = defineTranslation3({
|
|
@@ -1885,7 +1885,7 @@ var init_locale = __esm(() => {
|
|
|
1885
1885
|
});
|
|
1886
1886
|
|
|
1887
1887
|
// src/i18n/messages.ts
|
|
1888
|
-
import { TranslationRegistry } from "@contractspec/lib.contracts/translations";
|
|
1888
|
+
import { TranslationRegistry } from "@contractspec/lib.contracts-spec/translations";
|
|
1889
1889
|
function getRegistry() {
|
|
1890
1890
|
if (!sharedRegistry) {
|
|
1891
1891
|
sharedRegistry = new TranslationRegistry([
|
|
@@ -5,5 +5,4 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @module i18n/catalogs/en
|
|
7
7
|
*/
|
|
8
|
-
export declare const enMessages: import("@contractspec/lib.contracts/translations").TranslationSpec;
|
|
9
|
-
//# sourceMappingURL=en.d.ts.map
|
|
8
|
+
export declare const enMessages: import("@contractspec/lib.contracts-spec/translations").TranslationSpec;
|
package/dist/i18n/catalogs/en.js
CHANGED
|
@@ -13,7 +13,7 @@ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
|
13
13
|
var __require = import.meta.require;
|
|
14
14
|
|
|
15
15
|
// src/i18n/catalogs/en.ts
|
|
16
|
-
import { defineTranslation } from "@contractspec/lib.contracts/translations";
|
|
16
|
+
import { defineTranslation } from "@contractspec/lib.contracts-spec/translations";
|
|
17
17
|
var enMessages;
|
|
18
18
|
var init_en = __esm(() => {
|
|
19
19
|
enMessages = defineTranslation({
|
|
@@ -5,5 +5,4 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @module i18n/catalogs/es
|
|
7
7
|
*/
|
|
8
|
-
export declare const esMessages: import("@contractspec/lib.contracts/translations").TranslationSpec;
|
|
9
|
-
//# sourceMappingURL=es.d.ts.map
|
|
8
|
+
export declare const esMessages: import("@contractspec/lib.contracts-spec/translations").TranslationSpec;
|
package/dist/i18n/catalogs/es.js
CHANGED
|
@@ -13,7 +13,7 @@ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
|
13
13
|
var __require = import.meta.require;
|
|
14
14
|
|
|
15
15
|
// src/i18n/catalogs/es.ts
|
|
16
|
-
import { defineTranslation } from "@contractspec/lib.contracts/translations";
|
|
16
|
+
import { defineTranslation } from "@contractspec/lib.contracts-spec/translations";
|
|
17
17
|
var esMessages;
|
|
18
18
|
var init_es = __esm(() => {
|
|
19
19
|
esMessages = defineTranslation({
|
|
@@ -5,5 +5,4 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @module i18n/catalogs/fr
|
|
7
7
|
*/
|
|
8
|
-
export declare const frMessages: import("@contractspec/lib.contracts/translations").TranslationSpec;
|
|
9
|
-
//# sourceMappingURL=fr.d.ts.map
|
|
8
|
+
export declare const frMessages: import("@contractspec/lib.contracts-spec/translations").TranslationSpec;
|
package/dist/i18n/catalogs/fr.js
CHANGED
|
@@ -13,7 +13,7 @@ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
|
13
13
|
var __require = import.meta.require;
|
|
14
14
|
|
|
15
15
|
// src/i18n/catalogs/fr.ts
|
|
16
|
-
import { defineTranslation } from "@contractspec/lib.contracts/translations";
|
|
16
|
+
import { defineTranslation } from "@contractspec/lib.contracts-spec/translations";
|
|
17
17
|
var frMessages;
|
|
18
18
|
var init_fr = __esm(() => {
|
|
19
19
|
frMessages = defineTranslation({
|
|
@@ -13,7 +13,7 @@ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
|
13
13
|
var __require = import.meta.require;
|
|
14
14
|
|
|
15
15
|
// src/i18n/catalogs/en.ts
|
|
16
|
-
import { defineTranslation } from "@contractspec/lib.contracts/translations";
|
|
16
|
+
import { defineTranslation } from "@contractspec/lib.contracts-spec/translations";
|
|
17
17
|
var enMessages;
|
|
18
18
|
var init_en = __esm(() => {
|
|
19
19
|
enMessages = defineTranslation({
|
|
@@ -609,7 +609,7 @@ var init_en = __esm(() => {
|
|
|
609
609
|
});
|
|
610
610
|
|
|
611
611
|
// src/i18n/catalogs/fr.ts
|
|
612
|
-
import { defineTranslation as defineTranslation2 } from "@contractspec/lib.contracts/translations";
|
|
612
|
+
import { defineTranslation as defineTranslation2 } from "@contractspec/lib.contracts-spec/translations";
|
|
613
613
|
var frMessages;
|
|
614
614
|
var init_fr = __esm(() => {
|
|
615
615
|
frMessages = defineTranslation2({
|
|
@@ -1220,7 +1220,7 @@ var init_fr = __esm(() => {
|
|
|
1220
1220
|
});
|
|
1221
1221
|
|
|
1222
1222
|
// src/i18n/catalogs/es.ts
|
|
1223
|
-
import { defineTranslation as defineTranslation3 } from "@contractspec/lib.contracts/translations";
|
|
1223
|
+
import { defineTranslation as defineTranslation3 } from "@contractspec/lib.contracts-spec/translations";
|
|
1224
1224
|
var esMessages;
|
|
1225
1225
|
var init_es = __esm(() => {
|
|
1226
1226
|
esMessages = defineTranslation3({
|
package/dist/i18n/i18n.test.d.ts
CHANGED
package/dist/i18n/index.d.ts
CHANGED
package/dist/i18n/index.js
CHANGED
|
@@ -13,7 +13,7 @@ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
|
13
13
|
var __require = import.meta.require;
|
|
14
14
|
|
|
15
15
|
// src/i18n/catalogs/en.ts
|
|
16
|
-
import { defineTranslation } from "@contractspec/lib.contracts/translations";
|
|
16
|
+
import { defineTranslation } from "@contractspec/lib.contracts-spec/translations";
|
|
17
17
|
var enMessages;
|
|
18
18
|
var init_en = __esm(() => {
|
|
19
19
|
enMessages = defineTranslation({
|
|
@@ -609,7 +609,7 @@ var init_en = __esm(() => {
|
|
|
609
609
|
});
|
|
610
610
|
|
|
611
611
|
// src/i18n/catalogs/fr.ts
|
|
612
|
-
import { defineTranslation as defineTranslation2 } from "@contractspec/lib.contracts/translations";
|
|
612
|
+
import { defineTranslation as defineTranslation2 } from "@contractspec/lib.contracts-spec/translations";
|
|
613
613
|
var frMessages;
|
|
614
614
|
var init_fr = __esm(() => {
|
|
615
615
|
frMessages = defineTranslation2({
|
|
@@ -1220,7 +1220,7 @@ var init_fr = __esm(() => {
|
|
|
1220
1220
|
});
|
|
1221
1221
|
|
|
1222
1222
|
// src/i18n/catalogs/es.ts
|
|
1223
|
-
import { defineTranslation as defineTranslation3 } from "@contractspec/lib.contracts/translations";
|
|
1223
|
+
import { defineTranslation as defineTranslation3 } from "@contractspec/lib.contracts-spec/translations";
|
|
1224
1224
|
var esMessages;
|
|
1225
1225
|
var init_es = __esm(() => {
|
|
1226
1226
|
esMessages = defineTranslation3({
|
|
@@ -1885,7 +1885,7 @@ var init_locale = __esm(() => {
|
|
|
1885
1885
|
});
|
|
1886
1886
|
|
|
1887
1887
|
// src/i18n/messages.ts
|
|
1888
|
-
import { TranslationRegistry } from "@contractspec/lib.contracts/translations";
|
|
1888
|
+
import { TranslationRegistry } from "@contractspec/lib.contracts-spec/translations";
|
|
1889
1889
|
function getRegistry() {
|
|
1890
1890
|
if (!sharedRegistry) {
|
|
1891
1891
|
sharedRegistry = new TranslationRegistry([
|
package/dist/i18n/keys.d.ts
CHANGED
package/dist/i18n/locale.d.ts
CHANGED
|
@@ -31,4 +31,3 @@ export declare function resolveLocale(specLocale?: string, runtimeLocale?: strin
|
|
|
31
31
|
* Check if a locale string is one of the supported locales.
|
|
32
32
|
*/
|
|
33
33
|
export declare function isSupportedLocale(locale: string): locale is SupportedLocale;
|
|
34
|
-
//# sourceMappingURL=locale.d.ts.map
|
package/dist/i18n/messages.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Provides a lightweight `t()` function that resolves message keys
|
|
5
5
|
* to translated strings using the TranslationRegistry from
|
|
6
|
-
* @contractspec/lib.contracts.
|
|
6
|
+
* @contractspec/lib.contracts-spec.
|
|
7
7
|
*
|
|
8
8
|
* @module i18n/messages
|
|
9
9
|
*/
|
|
@@ -63,4 +63,3 @@ export declare function getDefaultI18n(): AgentI18n;
|
|
|
63
63
|
* @internal
|
|
64
64
|
*/
|
|
65
65
|
export declare function resetI18nRegistry(): void;
|
|
66
|
-
//# sourceMappingURL=messages.d.ts.map
|
package/dist/i18n/messages.js
CHANGED
|
@@ -13,7 +13,7 @@ var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
|
|
|
13
13
|
var __require = import.meta.require;
|
|
14
14
|
|
|
15
15
|
// src/i18n/catalogs/en.ts
|
|
16
|
-
import { defineTranslation } from "@contractspec/lib.contracts/translations";
|
|
16
|
+
import { defineTranslation } from "@contractspec/lib.contracts-spec/translations";
|
|
17
17
|
var enMessages;
|
|
18
18
|
var init_en = __esm(() => {
|
|
19
19
|
enMessages = defineTranslation({
|
|
@@ -609,7 +609,7 @@ var init_en = __esm(() => {
|
|
|
609
609
|
});
|
|
610
610
|
|
|
611
611
|
// src/i18n/catalogs/fr.ts
|
|
612
|
-
import { defineTranslation as defineTranslation2 } from "@contractspec/lib.contracts/translations";
|
|
612
|
+
import { defineTranslation as defineTranslation2 } from "@contractspec/lib.contracts-spec/translations";
|
|
613
613
|
var frMessages;
|
|
614
614
|
var init_fr = __esm(() => {
|
|
615
615
|
frMessages = defineTranslation2({
|
|
@@ -1220,7 +1220,7 @@ var init_fr = __esm(() => {
|
|
|
1220
1220
|
});
|
|
1221
1221
|
|
|
1222
1222
|
// src/i18n/catalogs/es.ts
|
|
1223
|
-
import { defineTranslation as defineTranslation3 } from "@contractspec/lib.contracts/translations";
|
|
1223
|
+
import { defineTranslation as defineTranslation3 } from "@contractspec/lib.contracts-spec/translations";
|
|
1224
1224
|
var esMessages;
|
|
1225
1225
|
var init_es = __esm(() => {
|
|
1226
1226
|
esMessages = defineTranslation3({
|
|
@@ -1885,7 +1885,7 @@ var init_locale = __esm(() => {
|
|
|
1885
1885
|
});
|
|
1886
1886
|
|
|
1887
1887
|
// src/i18n/messages.ts
|
|
1888
|
-
import { TranslationRegistry } from "@contractspec/lib.contracts/translations";
|
|
1888
|
+
import { TranslationRegistry } from "@contractspec/lib.contracts-spec/translations";
|
|
1889
1889
|
function getRegistry() {
|
|
1890
1890
|
if (!sharedRegistry) {
|
|
1891
1891
|
sharedRegistry = new TranslationRegistry([
|
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,2 @@
|
|
|
1
|
-
export * from './agent';
|
|
2
1
|
export * from './spec';
|
|
3
2
|
export * from './types';
|
|
4
|
-
export * from './tools';
|
|
5
|
-
export * from './schema';
|
|
6
|
-
export * from './knowledge';
|
|
7
|
-
export * from './session';
|
|
8
|
-
export * from './telemetry';
|
|
9
|
-
export * from './approval';
|
|
10
|
-
export * from './i18n';
|
|
11
|
-
export * from './providers';
|
|
12
|
-
export * from './exporters';
|
|
13
|
-
export * from './interop';
|
|
14
|
-
export type { LanguageModel, Tool, ModelMessage, StepResult, LanguageModelUsage, ToolSet, generateText, } from 'ai';
|
|
15
|
-
export { Experimental_Agent as ToolLoopAgent } from 'ai';
|
|
16
|
-
//# sourceMappingURL=index.d.ts.map
|