@assemblyline-agents/core 0.1.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/LICENSE +21 -0
- package/README.md +19 -0
- package/dist/adapter-metadata.d.ts +7 -0
- package/dist/adapter-metadata.d.ts.map +1 -0
- package/dist/adapter-metadata.js +232 -0
- package/dist/adapter-metadata.js.map +1 -0
- package/dist/artifact-dir.d.ts +21 -0
- package/dist/artifact-dir.d.ts.map +1 -0
- package/dist/artifact-dir.js +35 -0
- package/dist/artifact-dir.js.map +1 -0
- package/dist/brand.d.ts +37 -0
- package/dist/brand.d.ts.map +1 -0
- package/dist/brand.js +42 -0
- package/dist/brand.js.map +1 -0
- package/dist/connection-auth.d.ts +27 -0
- package/dist/connection-auth.d.ts.map +1 -0
- package/dist/connection-auth.js +75 -0
- package/dist/connection-auth.js.map +1 -0
- package/dist/connection-types.d.ts +318 -0
- package/dist/connection-types.d.ts.map +1 -0
- package/dist/connection-types.js +2 -0
- package/dist/connection-types.js.map +1 -0
- package/dist/definitions.d.ts +98 -0
- package/dist/definitions.d.ts.map +1 -0
- package/dist/definitions.js +193 -0
- package/dist/definitions.js.map +1 -0
- package/dist/deploy.d.ts +151 -0
- package/dist/deploy.d.ts.map +1 -0
- package/dist/deploy.js +25 -0
- package/dist/deploy.js.map +1 -0
- package/dist/env-alias.d.ts +35 -0
- package/dist/env-alias.d.ts.map +1 -0
- package/dist/env-alias.js +79 -0
- package/dist/env-alias.js.map +1 -0
- package/dist/harness.d.ts +299 -0
- package/dist/harness.d.ts.map +1 -0
- package/dist/harness.js +22 -0
- package/dist/harness.js.map +1 -0
- package/dist/index.d.ts +487 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +23 -0
- package/dist/index.js.map +1 -0
- package/dist/json-schema-validate.d.ts +17 -0
- package/dist/json-schema-validate.d.ts.map +1 -0
- package/dist/json-schema-validate.js +79 -0
- package/dist/json-schema-validate.js.map +1 -0
- package/dist/manifest-types.d.ts +248 -0
- package/dist/manifest-types.d.ts.map +1 -0
- package/dist/manifest-types.js +2 -0
- package/dist/manifest-types.js.map +1 -0
- package/dist/plugin.d.ts +134 -0
- package/dist/plugin.d.ts.map +1 -0
- package/dist/plugin.js +830 -0
- package/dist/plugin.js.map +1 -0
- package/dist/provider.d.ts +43 -0
- package/dist/provider.d.ts.map +1 -0
- package/dist/provider.js +33 -0
- package/dist/provider.js.map +1 -0
- package/dist/resource-types.d.ts +119 -0
- package/dist/resource-types.d.ts.map +1 -0
- package/dist/resource-types.js +2 -0
- package/dist/resource-types.js.map +1 -0
- package/dist/sandbox-filesystem-contract.d.ts +28 -0
- package/dist/sandbox-filesystem-contract.d.ts.map +1 -0
- package/dist/sandbox-filesystem-contract.js +64 -0
- package/dist/sandbox-filesystem-contract.js.map +1 -0
- package/dist/sandbox-paths.d.ts +24 -0
- package/dist/sandbox-paths.d.ts.map +1 -0
- package/dist/sandbox-paths.js +107 -0
- package/dist/sandbox-paths.js.map +1 -0
- package/dist/sandbox-security.d.ts +10 -0
- package/dist/sandbox-security.d.ts.map +1 -0
- package/dist/sandbox-security.js +34 -0
- package/dist/sandbox-security.js.map +1 -0
- package/dist/sandbox-types.d.ts +114 -0
- package/dist/sandbox-types.d.ts.map +1 -0
- package/dist/sandbox-types.js +2 -0
- package/dist/sandbox-types.js.map +1 -0
- package/package.json +47 -0
package/dist/deploy.d.ts
ADDED
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared deploy contracts used by deploy adapter packages (fly, railway, docker, vps)
|
|
3
|
+
* and hosts that publish build artifacts.
|
|
4
|
+
*/
|
|
5
|
+
/** A single manifest preflight requirement relevant to deploy publishers. */
|
|
6
|
+
export interface DeployPreflightRequirement {
|
|
7
|
+
kind: string;
|
|
8
|
+
name: string;
|
|
9
|
+
alternatives?: string[];
|
|
10
|
+
required?: boolean;
|
|
11
|
+
adapter?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface DeployArtifactManifest {
|
|
14
|
+
/** Source agent folder; used for stable provider naming when id/name are absent. */
|
|
15
|
+
root?: string;
|
|
16
|
+
preflight?: DeployPreflightRequirement[];
|
|
17
|
+
agent?: {
|
|
18
|
+
id?: string;
|
|
19
|
+
name?: string;
|
|
20
|
+
model: string;
|
|
21
|
+
};
|
|
22
|
+
deploymentRequirements?: {
|
|
23
|
+
persistentDirectories: Array<{
|
|
24
|
+
id: string;
|
|
25
|
+
path: string;
|
|
26
|
+
sensitive: boolean;
|
|
27
|
+
}>;
|
|
28
|
+
remoteExecution: boolean;
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
/** A built agent artifact ready to publish. */
|
|
32
|
+
export interface DeployArtifact {
|
|
33
|
+
root: string;
|
|
34
|
+
manifest?: DeployArtifactManifest;
|
|
35
|
+
}
|
|
36
|
+
/** The resolved plan describing where and what to publish. */
|
|
37
|
+
export interface DeployPlan {
|
|
38
|
+
target: string;
|
|
39
|
+
environment: string;
|
|
40
|
+
agentRevision: string;
|
|
41
|
+
/** Stable logical agent identity (manifest `agent.id`, falling back to `agent.name`). */
|
|
42
|
+
agentId?: string;
|
|
43
|
+
/**
|
|
44
|
+
* The environment deploys land in when `--env` is not passed (manifest
|
|
45
|
+
* `gateway.deploy.options.environment`, else "development"). Resources for
|
|
46
|
+
* this environment keep their legacy unscoped names; every other environment
|
|
47
|
+
* must be isolated — see {@link environmentScopedName}.
|
|
48
|
+
*/
|
|
49
|
+
defaultEnvironment?: string;
|
|
50
|
+
/** Resolved requirements when a compiler deployment plan is passed through the CLI. */
|
|
51
|
+
requirements?: DeployPreflightRequirement[];
|
|
52
|
+
}
|
|
53
|
+
/** Lowercased, dash-separated resource label safe for provider resource names. */
|
|
54
|
+
export declare function sanitizeDeployName(value: string, maxLength?: number): string;
|
|
55
|
+
/**
|
|
56
|
+
* Environment-scoped resource naming shared by deploy targets that isolate
|
|
57
|
+
* environments by name (docker containers/volumes, fly apps) rather than
|
|
58
|
+
* natively (railway environments) or by identity hash (vps). The default
|
|
59
|
+
* environment keeps the unscoped `base` so existing deployments are never
|
|
60
|
+
* orphaned; any other environment gets a `-<environment>` suffix.
|
|
61
|
+
*/
|
|
62
|
+
export declare function environmentScopedName(base: string, plan: Pick<DeployPlan, "environment" | "defaultEnvironment">): string;
|
|
63
|
+
export interface DeployCommandResult {
|
|
64
|
+
exitCode: number;
|
|
65
|
+
stdout: string;
|
|
66
|
+
stderr: string;
|
|
67
|
+
}
|
|
68
|
+
export interface DeployCommandOptions {
|
|
69
|
+
cwd?: string;
|
|
70
|
+
env?: Record<string, string | undefined>;
|
|
71
|
+
silent?: boolean;
|
|
72
|
+
}
|
|
73
|
+
/** Runner used by deploy publishers to execute provider CLI commands. */
|
|
74
|
+
export type RunDeployCommand = (executable: string, args: string[], options?: DeployCommandOptions) => Promise<DeployCommandResult>;
|
|
75
|
+
/** Provider-specific receipt describing the published deployment. */
|
|
76
|
+
export interface DeployReceipt {
|
|
77
|
+
[key: string]: unknown;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Canonical URL fields every deploy receipt should populate so callers never
|
|
81
|
+
* conflate the public service URL with a provider dashboard link.
|
|
82
|
+
* `deploymentUrl` is the reachable service URL (or null when the provider can't
|
|
83
|
+
* resolve one yet); `dashboardUrl` is the provider's management console.
|
|
84
|
+
*/
|
|
85
|
+
export interface DeployReceiptUrls {
|
|
86
|
+
deploymentUrl: string | null;
|
|
87
|
+
dashboardUrl?: string;
|
|
88
|
+
}
|
|
89
|
+
/** Receipt for a secret-sync operation. Never contains secret values. */
|
|
90
|
+
export interface DeploySecretsReceipt {
|
|
91
|
+
target: string;
|
|
92
|
+
/** Keys that were pushed to the target (names only). */
|
|
93
|
+
syncedKeys: string[];
|
|
94
|
+
/** Keys skipped because they were empty/unset locally. */
|
|
95
|
+
skippedKeys: string[];
|
|
96
|
+
}
|
|
97
|
+
/** Migration inputs resolved by the CLI and delegated to capable publishers. */
|
|
98
|
+
export interface DeployMigrationRequest {
|
|
99
|
+
/** Artifact-relative migration entries, in deterministic order. */
|
|
100
|
+
entries: string[];
|
|
101
|
+
/** Executable configured by --migration-command/OPENEVE_MIGRATION_COMMAND. */
|
|
102
|
+
command?: string;
|
|
103
|
+
}
|
|
104
|
+
export interface DeployRemoteCommandOptions {
|
|
105
|
+
interactive?: boolean;
|
|
106
|
+
silent?: boolean;
|
|
107
|
+
/** Run against the currently active release or the most recently prepared release. */
|
|
108
|
+
release?: "active" | "prepared";
|
|
109
|
+
}
|
|
110
|
+
export interface DeployDestroyOptions {
|
|
111
|
+
/** Also delete durable data (volumes, databases). Default keeps data. */
|
|
112
|
+
purgeData?: boolean;
|
|
113
|
+
}
|
|
114
|
+
/** Contract implemented by deploy adapter packages. */
|
|
115
|
+
export interface DeployPublisher {
|
|
116
|
+
target: string;
|
|
117
|
+
/** Validate the remote target before making deployment-scoped changes. */
|
|
118
|
+
preflight?(artifact: DeployArtifact, plan: DeployPlan): Promise<DeployReceipt | void>;
|
|
119
|
+
/** Stage immutable build inputs and provision deployment-scoped infrastructure. */
|
|
120
|
+
prepare?(artifact: DeployArtifact, plan: DeployPlan): Promise<DeployReceipt | void>;
|
|
121
|
+
/** Activate the most recently prepared release. `publish` remains the compatibility alias. */
|
|
122
|
+
activate?(artifact: DeployArtifact, plan: DeployPlan): Promise<DeployReceipt>;
|
|
123
|
+
publish(artifact: DeployArtifact, plan: DeployPlan): Promise<DeployReceipt>;
|
|
124
|
+
/** Restore the prior active release without rebuilding or replacing durable state. */
|
|
125
|
+
rollback?(artifact: DeployArtifact, plan: DeployPlan): Promise<DeployReceipt>;
|
|
126
|
+
/**
|
|
127
|
+
* Remove the provider resources backing `plan.environment` (container/app/
|
|
128
|
+
* service). Durable data survives unless `options.purgeData`. Like rollback,
|
|
129
|
+
* implementations re-derive resource names from the plan; there is no receipt
|
|
130
|
+
* to consult. Targets that cannot remove resources safely omit this.
|
|
131
|
+
*/
|
|
132
|
+
destroy?(artifact: DeployArtifact, plan: DeployPlan, options?: DeployDestroyOptions): Promise<DeployReceipt>;
|
|
133
|
+
/** Reconcile the configured primary domain and aliases without rebuilding the runtime. */
|
|
134
|
+
reconcileDomains?(artifact: DeployArtifact, plan: DeployPlan): Promise<DeployReceipt>;
|
|
135
|
+
/**
|
|
136
|
+
* Optional: push secrets to the deployed service. Adapters without a remote
|
|
137
|
+
* service (docker, local) omit this; callers feature-detect. Implementations
|
|
138
|
+
* MUST NOT log secret values — only key names.
|
|
139
|
+
*/
|
|
140
|
+
syncSecrets?(secrets: Record<string, string>, plan: DeployPlan): Promise<DeploySecretsReceipt>;
|
|
141
|
+
/** Return configured remote secret key names only; values must never cross this interface. */
|
|
142
|
+
inspectSecrets?(artifact: DeployArtifact, plan: DeployPlan): Promise<string[]>;
|
|
143
|
+
/**
|
|
144
|
+
* Optional publisher-owned migration path. VPS-like targets use this to run
|
|
145
|
+
* migrations beside private databases without exposing credentials locally.
|
|
146
|
+
*/
|
|
147
|
+
runMigrations?(artifact: DeployArtifact, plan: DeployPlan, request: DeployMigrationRequest): Promise<string>;
|
|
148
|
+
/** Execute a command in the deployed runtime without exposing credential material to OpenEve. */
|
|
149
|
+
runRemoteCommand?(artifact: DeployArtifact, plan: DeployPlan, command: string[], options?: DeployRemoteCommandOptions): Promise<DeployCommandResult>;
|
|
150
|
+
}
|
|
151
|
+
//# sourceMappingURL=deploy.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../src/deploy.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,6EAA6E;AAC7E,MAAM,WAAW,0BAA0B;IACzC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,sBAAsB;IACrC,oFAAoF;IACpF,I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AAM,CAAC,CAAC;IACnB,iGAAiG;IACjG,gBAAgB,CAAC,CACf,QAAQ,EAAE,cAAc,EACxB,IAAI,EAAE,UAAU,EAChB,OAAO,EAAE,MAAM,EAAE,EACjB,OAAO,CAAC,EAAE,0BAA0B,GACnC,OAAO,CAAC,mBAAmB,CAAC,CAAC;CACjC"}
|
package/dist/deploy.js
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared deploy contracts used by deploy adapter packages (fly, railway, docker, vps)
|
|
3
|
+
* and hosts that publish build artifacts.
|
|
4
|
+
*/
|
|
5
|
+
/** Lowercased, dash-separated resource label safe for provider resource names. */
|
|
6
|
+
export function sanitizeDeployName(value, maxLength = 40) {
|
|
7
|
+
return value
|
|
8
|
+
.toLowerCase()
|
|
9
|
+
.replace(/[^a-z0-9]+/gu, "-")
|
|
10
|
+
.replace(/^-+|-+$/gu, "")
|
|
11
|
+
.slice(0, maxLength) || "default";
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Environment-scoped resource naming shared by deploy targets that isolate
|
|
15
|
+
* environments by name (docker containers/volumes, fly apps) rather than
|
|
16
|
+
* natively (railway environments) or by identity hash (vps). The default
|
|
17
|
+
* environment keeps the unscoped `base` so existing deployments are never
|
|
18
|
+
* orphaned; any other environment gets a `-<environment>` suffix.
|
|
19
|
+
*/
|
|
20
|
+
export function environmentScopedName(base, plan) {
|
|
21
|
+
if (!plan.defaultEnvironment || plan.environment === plan.defaultEnvironment)
|
|
22
|
+
return base;
|
|
23
|
+
return `${base}-${sanitizeDeployName(plan.environment, 20)}`;
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=deploy.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"deploy.js","sourceRoot":"","sources":["../src/deploy.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAsDH,kFAAkF;AAClF,MAAM,UAAU,kBAAkB,CAAC,KAAa,EAAE,SAAS,GAAG,EAAE;IAC9D,OAAO,KAAK;SACT,WAAW,EAAE;SACb,OAAO,CAAC,cAAc,EAAE,GAAG,CAAC;SAC5B,OAAO,CAAC,WAAW,EAAE,EAAE,CAAC;SACxB,KAAK,CAAC,CAAC,EAAE,SAAS,CAAC,IAAI,SAAS,CAAC;AACtC,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,qBAAqB,CACnC,IAAY,EACZ,IAA4D;IAE5D,IAAI,CAAC,IAAI,CAAC,kBAAkB,IAAI,IAAI,CAAC,WAAW,KAAK,IAAI,CAAC,kBAAkB;QAAE,OAAO,IAAI,CAAC;IAC1F,OAAO,GAAG,IAAI,IAAI,kBAAkB,CAAC,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC,EAAE,CAAC;AAC/D,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Environment-variable aliasing for the rename compatibility window.
|
|
3
|
+
*
|
|
4
|
+
* The contract is a uniform prefix bijection: every `ASSEMBLY_LINE_X` has the
|
|
5
|
+
* legacy spelling `OPENEVE_X` and vice versa. Aliasing mirrors each value
|
|
6
|
+
* under both names so existing read sites (including prefix rules like
|
|
7
|
+
* `OPENEVE_VPS_BACKUP_*` and the `OPENEVE_*_RATE_LIMIT` family) keep working
|
|
8
|
+
* without per-site edits. Precedence: the new name wins; equal duplicates are
|
|
9
|
+
* accepted; conflicting duplicates are a hard error.
|
|
10
|
+
*/
|
|
11
|
+
export declare function canonicalEnvName(name: string): string;
|
|
12
|
+
export declare function legacyEnvName(name: string): string;
|
|
13
|
+
export declare class EnvAliasConflictError extends Error {
|
|
14
|
+
readonly names: readonly [string, string];
|
|
15
|
+
constructor(newName: string, legacyName: string);
|
|
16
|
+
}
|
|
17
|
+
export interface AppliedEnvAliases {
|
|
18
|
+
env: Record<string, string | undefined>;
|
|
19
|
+
/** Variables supplied only under their legacy `OPENEVE_*` name. */
|
|
20
|
+
legacyOnlyNames: string[];
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Returns a copy of `env` where every branded variable is readable under both
|
|
24
|
+
* its `ASSEMBLY_LINE_*` and `OPENEVE_*` spellings. Throws
|
|
25
|
+
* {@link EnvAliasConflictError} when both spellings are set to different
|
|
26
|
+
* values. The input record is not mutated.
|
|
27
|
+
*/
|
|
28
|
+
export declare function applyEnvAliases(env: Record<string, string | undefined>): AppliedEnvAliases;
|
|
29
|
+
/**
|
|
30
|
+
* Mirrors branded variables into `target` in place (used for `process.env`,
|
|
31
|
+
* which must keep its exotic binding). Same precedence rules as
|
|
32
|
+
* {@link applyEnvAliases}.
|
|
33
|
+
*/
|
|
34
|
+
export declare function mirrorEnvAliasesInPlace(target: Record<string, string | undefined>): AppliedEnvAliases;
|
|
35
|
+
//# sourceMappingURL=env-alias.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env-alias.d.ts","sourceRoot":"","sources":["../src/env-alias.ts"],"names":[],"mappings":"AAEA;;;;;;;;;GASG;AAEH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAIrD;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAIlD;AAED,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;gBAE9B,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM;CAQhD;AAED,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IACxC,mEAAmE;IACnE,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GAAG,iBAAiB,CAyB1F;AAED;;;;GAIG;AACH,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,GAAG,iBAAiB,CAMrG"}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { ENV_PREFIX, LEGACY_ENV_PREFIX } from "./brand.js";
|
|
2
|
+
/**
|
|
3
|
+
* Environment-variable aliasing for the rename compatibility window.
|
|
4
|
+
*
|
|
5
|
+
* The contract is a uniform prefix bijection: every `ASSEMBLY_LINE_X` has the
|
|
6
|
+
* legacy spelling `OPENEVE_X` and vice versa. Aliasing mirrors each value
|
|
7
|
+
* under both names so existing read sites (including prefix rules like
|
|
8
|
+
* `OPENEVE_VPS_BACKUP_*` and the `OPENEVE_*_RATE_LIMIT` family) keep working
|
|
9
|
+
* without per-site edits. Precedence: the new name wins; equal duplicates are
|
|
10
|
+
* accepted; conflicting duplicates are a hard error.
|
|
11
|
+
*/
|
|
12
|
+
export function canonicalEnvName(name) {
|
|
13
|
+
return name.startsWith(LEGACY_ENV_PREFIX)
|
|
14
|
+
? `${ENV_PREFIX}${name.slice(LEGACY_ENV_PREFIX.length)}`
|
|
15
|
+
: name;
|
|
16
|
+
}
|
|
17
|
+
export function legacyEnvName(name) {
|
|
18
|
+
return name.startsWith(ENV_PREFIX)
|
|
19
|
+
? `${LEGACY_ENV_PREFIX}${name.slice(ENV_PREFIX.length)}`
|
|
20
|
+
: name;
|
|
21
|
+
}
|
|
22
|
+
export class EnvAliasConflictError extends Error {
|
|
23
|
+
names;
|
|
24
|
+
constructor(newName, legacyName) {
|
|
25
|
+
super(`Conflicting values for ${newName} and ${legacyName}. ` +
|
|
26
|
+
`These are aliases for the same setting; set one, or set both to the same value.`);
|
|
27
|
+
this.name = "EnvAliasConflictError";
|
|
28
|
+
this.names = [newName, legacyName];
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Returns a copy of `env` where every branded variable is readable under both
|
|
33
|
+
* its `ASSEMBLY_LINE_*` and `OPENEVE_*` spellings. Throws
|
|
34
|
+
* {@link EnvAliasConflictError} when both spellings are set to different
|
|
35
|
+
* values. The input record is not mutated.
|
|
36
|
+
*/
|
|
37
|
+
export function applyEnvAliases(env) {
|
|
38
|
+
const merged = { ...env };
|
|
39
|
+
const legacyOnlyNames = [];
|
|
40
|
+
for (const [name, value] of Object.entries(env)) {
|
|
41
|
+
if (value === undefined)
|
|
42
|
+
continue;
|
|
43
|
+
if (name.startsWith(ENV_PREFIX)) {
|
|
44
|
+
const legacy = legacyEnvName(name);
|
|
45
|
+
const legacyValue = env[legacy];
|
|
46
|
+
if (legacyValue !== undefined && legacyValue !== value) {
|
|
47
|
+
throw new EnvAliasConflictError(name, legacy);
|
|
48
|
+
}
|
|
49
|
+
merged[legacy] = value;
|
|
50
|
+
}
|
|
51
|
+
else if (name.startsWith(LEGACY_ENV_PREFIX)) {
|
|
52
|
+
const canonical = canonicalEnvName(name);
|
|
53
|
+
const canonicalValue = env[canonical];
|
|
54
|
+
if (canonicalValue !== undefined) {
|
|
55
|
+
if (canonicalValue !== value)
|
|
56
|
+
throw new EnvAliasConflictError(canonical, name);
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
59
|
+
merged[canonical] = value;
|
|
60
|
+
legacyOnlyNames.push(name);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
legacyOnlyNames.sort();
|
|
64
|
+
return { env: merged, legacyOnlyNames };
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Mirrors branded variables into `target` in place (used for `process.env`,
|
|
68
|
+
* which must keep its exotic binding). Same precedence rules as
|
|
69
|
+
* {@link applyEnvAliases}.
|
|
70
|
+
*/
|
|
71
|
+
export function mirrorEnvAliasesInPlace(target) {
|
|
72
|
+
const applied = applyEnvAliases({ ...target });
|
|
73
|
+
for (const [name, value] of Object.entries(applied.env)) {
|
|
74
|
+
if (value !== undefined && target[name] === undefined)
|
|
75
|
+
target[name] = value;
|
|
76
|
+
}
|
|
77
|
+
return { env: target, legacyOnlyNames: applied.legacyOnlyNames };
|
|
78
|
+
}
|
|
79
|
+
//# sourceMappingURL=env-alias.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env-alias.js","sourceRoot":"","sources":["../src/env-alias.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAE3D;;;;;;;;;GASG;AAEH,MAAM,UAAU,gBAAgB,CAAC,IAAY;IAC3C,OAAO,IAAI,CAAC,UAAU,CAAC,iBAAiB,CAAC;QACvC,CAAC,CAAC,GAAG,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,iBAAiB,CAAC,MAAM,CAAC,EAAE;QACxD,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,IAAY;IACxC,OAAO,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;QAChC,CAAC,CAAC,GAAG,iBAAiB,GAAG,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE;QACxD,CAAC,CAAC,IAAI,CAAC;AACX,CAAC;AAED,MAAM,OAAO,qBAAsB,SAAQ,KAAK;IACrC,KAAK,CAA4B;IAE1C,YAAY,OAAe,EAAE,UAAkB;QAC7C,KAAK,CACH,0BAA0B,OAAO,QAAQ,UAAU,IAAI;YACrD,iFAAiF,CACpF,CAAC;QACF,IAAI,CAAC,IAAI,GAAG,uBAAuB,CAAC;QACpC,IAAI,CAAC,KAAK,GAAG,CAAC,OAAO,EAAE,UAAU,CAAC,CAAC;IACrC,CAAC;CACF;AAQD;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAC,GAAuC;IACrE,MAAM,MAAM,GAAuC,EAAE,GAAG,GAAG,EAAE,CAAC;IAC9D,MAAM,eAAe,GAAa,EAAE,CAAC;IACrC,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAA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QACxD,IAAI,KAAK,KAAK,SAAS,IAAI,MAAM,CAAC,IAAI,CAAC,KAAK,SAAS;YAAE,MAAM,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC;IAC9E,CAAC;IACD,OAAO,EAAE,GAAG,EAAE,MAAM,EAAE,eAAe,EAAE,OAAO,CAAC,eAAe,EAAE,CAAC;AACnE,CAAC"}
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
import type { JsonObject, JsonSchema, ReasoningLevel } from "./index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Internal contract between the OpenEve runtime and the primary agent engine.
|
|
4
|
+
* Pi (`@assemblyline-agents/pi`) is the canonical engine; this seam is not a public
|
|
5
|
+
* extension point, but it is deliberately engine-shaped: nothing in this
|
|
6
|
+
* module may reference a specific engine, continuation state is an opaque
|
|
7
|
+
* JSON object owned by the engine adapter, and all durability (tool records,
|
|
8
|
+
* pauses, checkpoints, events, usage, spans) stays in the runtime. That keeps
|
|
9
|
+
* the runtime free of pi types, persisted state independent of pi internals,
|
|
10
|
+
* and `RuntimeOptions.agentHarness` available as the embedder/test seam
|
|
11
|
+
* (scripted engines drive the durability test suite through it).
|
|
12
|
+
*
|
|
13
|
+
* Message content (prompts, completions, tool arguments) is optionally surfaced
|
|
14
|
+
* through lifecycle events for observability, and only when the runtime opts in
|
|
15
|
+
* via `AgentHarnessContext.captureContent`. When that flag is false a harness
|
|
16
|
+
* must not populate the content fields (skip the transcript clone entirely).
|
|
17
|
+
* The runtime — not the harness — owns redaction, truncation, and sampling of
|
|
18
|
+
* whatever content it receives before any of it reaches a telemetry sink.
|
|
19
|
+
*/
|
|
20
|
+
/** A tool exposed to the model, described in engine-neutral terms. */
|
|
21
|
+
export interface HarnessToolDescriptor {
|
|
22
|
+
name: string;
|
|
23
|
+
description: string;
|
|
24
|
+
inputSchema: JsonSchema;
|
|
25
|
+
/**
|
|
26
|
+
* Tool-batch scheduling hint. `"sequential"` marks tools that may pause the
|
|
27
|
+
* run (approval gates, human input, connection authorization) or must not
|
|
28
|
+
* run concurrently; an engine must run any batch containing one
|
|
29
|
+
* sequentially and stop the batch at a pause. Absent means parallel-safe.
|
|
30
|
+
*/
|
|
31
|
+
execution?: "parallel" | "sequential";
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Binary media supplied to a model turn.
|
|
35
|
+
*
|
|
36
|
+
* `data` is raw base64 (not a data URL). Engine adapters own the final
|
|
37
|
+
* provider-specific encoding. `path` is the stable logical `/files/...`
|
|
38
|
+
* reference and is safe to surface when the selected model cannot accept the
|
|
39
|
+
* media natively.
|
|
40
|
+
*/
|
|
41
|
+
export interface HarnessImageInput {
|
|
42
|
+
type: "image";
|
|
43
|
+
data: string;
|
|
44
|
+
mimeType: string;
|
|
45
|
+
name?: string;
|
|
46
|
+
path?: string;
|
|
47
|
+
}
|
|
48
|
+
/** A complete video supplied for native temporal model understanding. */
|
|
49
|
+
export interface HarnessVideoInput {
|
|
50
|
+
type: "video";
|
|
51
|
+
data: string;
|
|
52
|
+
mimeType: string;
|
|
53
|
+
name?: string;
|
|
54
|
+
path?: string;
|
|
55
|
+
}
|
|
56
|
+
/** Engine-neutral media accepted by a harness turn. */
|
|
57
|
+
export type HarnessInputMedia = HarnessImageInput | HarnessVideoInput;
|
|
58
|
+
/**
|
|
59
|
+
* Outcome of a runtime tool execution as seen by the harness.
|
|
60
|
+
*
|
|
61
|
+
* - `result`: the tool produced bounded/redacted `output` plus optional typed
|
|
62
|
+
* `media`, which the harness returns to the model in its native format.
|
|
63
|
+
* - `pause`: the runtime paused the run (approval, human input, connection
|
|
64
|
+
* authorization). The harness must stop the loop after returning `output`
|
|
65
|
+
* as the tool result. `toolCallId` is an opaque correlation id the runtime
|
|
66
|
+
* will echo conceptually when the paused tool later resolves; harnesses
|
|
67
|
+
* that splice resumed tool results into their transcript should persist it
|
|
68
|
+
* in their continuation state.
|
|
69
|
+
*/
|
|
70
|
+
export type HarnessToolOutcome = {
|
|
71
|
+
kind: "result";
|
|
72
|
+
output: unknown;
|
|
73
|
+
media?: HarnessInputMedia[];
|
|
74
|
+
} | {
|
|
75
|
+
kind: "pause";
|
|
76
|
+
output: unknown;
|
|
77
|
+
media?: HarnessInputMedia[];
|
|
78
|
+
toolCallId?: string;
|
|
79
|
+
};
|
|
80
|
+
/** A model-requested tool call, described in engine-neutral terms. */
|
|
81
|
+
export interface HarnessContentToolCall {
|
|
82
|
+
id?: string;
|
|
83
|
+
name: string;
|
|
84
|
+
arguments: unknown;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* One message in the transcript sent to (or produced by) the model, surfaced
|
|
88
|
+
* for observability. Populated by a harness only when `captureContent` is set;
|
|
89
|
+
* the system prompt is intentionally excluded (the runtime already holds it).
|
|
90
|
+
*/
|
|
91
|
+
export interface HarnessContentMessage {
|
|
92
|
+
role: "system" | "user" | "assistant" | "tool";
|
|
93
|
+
text?: string;
|
|
94
|
+
/** Media metadata only; base64 payloads are never copied into observability events. */
|
|
95
|
+
media?: Array<{
|
|
96
|
+
type: HarnessInputMedia["type"];
|
|
97
|
+
mimeType: string;
|
|
98
|
+
name?: string;
|
|
99
|
+
path?: string;
|
|
100
|
+
}>;
|
|
101
|
+
toolCalls?: HarnessContentToolCall[];
|
|
102
|
+
toolResult?: {
|
|
103
|
+
toolCallId?: string;
|
|
104
|
+
output: unknown;
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
/** Where a provider call was billed. */
|
|
108
|
+
export type HarnessBillingMode = "api_key" | "chatgpt" | "byok" | "subscription" | "unknown";
|
|
109
|
+
/** Provenance for token counts returned by a harness. */
|
|
110
|
+
export type HarnessTokenSource = "provider_reported" | "provider_reconciled" | "unavailable";
|
|
111
|
+
/** Provenance for monetary values returned by a harness. */
|
|
112
|
+
export type HarnessCostSource = "provider_reported" | "provider_reconciled" | "unavailable";
|
|
113
|
+
/**
|
|
114
|
+
* Normalized provider usage. `inputTokens` is total provider input, including
|
|
115
|
+
* cached input; cached/reasoning counts are subsets and must not be added when
|
|
116
|
+
* computing total tokens. `costUsd` only carries provider-reported or
|
|
117
|
+
* reconciled cash; absent provider cash remains unavailable.
|
|
118
|
+
*/
|
|
119
|
+
export interface HarnessUsage {
|
|
120
|
+
inputTokens?: number;
|
|
121
|
+
outputTokens?: number;
|
|
122
|
+
cachedTokens?: number;
|
|
123
|
+
cacheWriteTokens?: number;
|
|
124
|
+
reasoningTokens?: number;
|
|
125
|
+
costUsd?: number;
|
|
126
|
+
upstreamCostUsd?: number;
|
|
127
|
+
currency?: string;
|
|
128
|
+
tokenSource?: HarnessTokenSource;
|
|
129
|
+
costSource?: HarnessCostSource;
|
|
130
|
+
}
|
|
131
|
+
/** Model-loop lifecycle events the harness reports back to the runtime. */
|
|
132
|
+
export type AgentHarnessEvent = {
|
|
133
|
+
type: "request_started";
|
|
134
|
+
iteration: number;
|
|
135
|
+
toolNames: string[];
|
|
136
|
+
provider?: string;
|
|
137
|
+
billingMode?: HarnessBillingMode;
|
|
138
|
+
/** Transcript sent to the model this iteration; only set when `captureContent` is on. */
|
|
139
|
+
requestMessages?: HarnessContentMessage[];
|
|
140
|
+
} | {
|
|
141
|
+
/** A model request attempt failed with a retryable error and is being retried. */
|
|
142
|
+
type: "model_retry";
|
|
143
|
+
iteration: number;
|
|
144
|
+
attempt: number;
|
|
145
|
+
delayMs: number;
|
|
146
|
+
error: string;
|
|
147
|
+
status?: number;
|
|
148
|
+
} | {
|
|
149
|
+
/**
|
|
150
|
+
* Incremental assistant text. Ephemeral: the runtime fans these out to
|
|
151
|
+
* live run-stream subscribers and never persists them to the event log.
|
|
152
|
+
*/
|
|
153
|
+
type: "response_delta";
|
|
154
|
+
iteration: number;
|
|
155
|
+
delta: string;
|
|
156
|
+
} | {
|
|
157
|
+
type: "response_completed";
|
|
158
|
+
iteration: number;
|
|
159
|
+
finishReason?: string;
|
|
160
|
+
toolCallCount: number;
|
|
161
|
+
usage?: HarnessUsage;
|
|
162
|
+
provider?: string;
|
|
163
|
+
responseModel?: string;
|
|
164
|
+
providerRequestId?: string;
|
|
165
|
+
billingMode?: HarnessBillingMode;
|
|
166
|
+
/** Sanitized provider receipt. Credentials and direct identifiers are forbidden. */
|
|
167
|
+
providerReceipt?: JsonObject;
|
|
168
|
+
/** Assistant output this iteration; only set when `captureContent` is on. */
|
|
169
|
+
responseContent?: {
|
|
170
|
+
text?: string;
|
|
171
|
+
toolCalls?: HarnessContentToolCall[];
|
|
172
|
+
};
|
|
173
|
+
};
|
|
174
|
+
/**
|
|
175
|
+
* Versioned, opaque harness continuation. The runtime persists this as-is and
|
|
176
|
+
* hands it back on resume. `state` must be JSON-serializable and is only
|
|
177
|
+
* interpreted by the harness that produced it (matched by `harness` + `version`).
|
|
178
|
+
*/
|
|
179
|
+
export interface HarnessContinuation {
|
|
180
|
+
harness: string;
|
|
181
|
+
version: number;
|
|
182
|
+
state: JsonObject;
|
|
183
|
+
}
|
|
184
|
+
/** Input for one harness turn: a fresh message or a resume of a paused turn. */
|
|
185
|
+
export type AgentTurnInput = {
|
|
186
|
+
kind: "message";
|
|
187
|
+
message: string;
|
|
188
|
+
recentHistory: string[];
|
|
189
|
+
media?: HarnessInputMedia[];
|
|
190
|
+
} | {
|
|
191
|
+
kind: "resume";
|
|
192
|
+
continuation: HarnessContinuation;
|
|
193
|
+
toolResult?: {
|
|
194
|
+
toolName: string;
|
|
195
|
+
output: unknown;
|
|
196
|
+
media?: HarnessInputMedia[];
|
|
197
|
+
};
|
|
198
|
+
/** Optional user follow-up appended to the restored transcript (subagent follow-ups). */
|
|
199
|
+
message?: string;
|
|
200
|
+
/** Optional media accompanying a user follow-up. */
|
|
201
|
+
media?: HarnessInputMedia[];
|
|
202
|
+
};
|
|
203
|
+
/** Runtime-provided context for one harness turn. */
|
|
204
|
+
export interface AgentHarnessContext {
|
|
205
|
+
runId: string;
|
|
206
|
+
sessionId: string;
|
|
207
|
+
modelSpec: string;
|
|
208
|
+
reasoning?: ReasoningLevel | undefined;
|
|
209
|
+
systemPrompt: string;
|
|
210
|
+
/** Optional final-output contract. Harnesses may use native provider constraints; the runtime validates authoritatively. */
|
|
211
|
+
outputSchema?: JsonSchema | undefined;
|
|
212
|
+
/** Maximum model requests permitted for this harness invocation. */
|
|
213
|
+
maxIterations?: number | undefined;
|
|
214
|
+
/** Cooperative runtime control signal, checked before each model request. */
|
|
215
|
+
shouldStop?(): boolean;
|
|
216
|
+
/**
|
|
217
|
+
* Hard-abort signal for run cancellation and deadline enforcement. Harnesses
|
|
218
|
+
* should abort in-flight model requests when it fires; the runtime settles
|
|
219
|
+
* the run outcome after the turn unwinds.
|
|
220
|
+
*/
|
|
221
|
+
signal?: AbortSignal;
|
|
222
|
+
env: Record<string, string | undefined>;
|
|
223
|
+
/** Current tool set. Re-invoked before each model request so mid-turn discovery is visible. */
|
|
224
|
+
tools(): Promise<HarnessToolDescriptor[]>;
|
|
225
|
+
/** Execute a model-requested tool through runtime durability. */
|
|
226
|
+
executeTool(call: {
|
|
227
|
+
toolCallId: string;
|
|
228
|
+
name: string;
|
|
229
|
+
input: unknown;
|
|
230
|
+
}): Promise<HarnessToolOutcome>;
|
|
231
|
+
/** Report a model-loop lifecycle event (events, usage, spans stay runtime-side). */
|
|
232
|
+
emit(event: AgentHarnessEvent): void | Promise<void>;
|
|
233
|
+
/**
|
|
234
|
+
* When true, the runtime wants message content on the lifecycle events
|
|
235
|
+
* (`requestMessages` / `responseContent`). When false or undefined, harnesses
|
|
236
|
+
* must skip populating them to avoid the transcript clone cost.
|
|
237
|
+
*/
|
|
238
|
+
captureContent?: boolean;
|
|
239
|
+
/** When provided, called with a fresh continuation snapshot after every model response. */
|
|
240
|
+
onIterationCheckpoint?(continuation: HarnessContinuation): Promise<void>;
|
|
241
|
+
}
|
|
242
|
+
export interface AgentTurnResult {
|
|
243
|
+
response: string;
|
|
244
|
+
paused?: boolean;
|
|
245
|
+
continuation?: HarnessContinuation;
|
|
246
|
+
/** Set when the turn ended at a runtime boundary rather than naturally or for a tool pause. */
|
|
247
|
+
stoppedReason?: "max_iterations" | "control_signal";
|
|
248
|
+
}
|
|
249
|
+
/** Token budget the runtime hands a harness when trimming a stored transcript. */
|
|
250
|
+
export interface HarnessTranscriptBudget {
|
|
251
|
+
/** Provider-reported input tokens of the transcript's last model request, when known. */
|
|
252
|
+
lastInputTokens?: number;
|
|
253
|
+
/** Tokens reserved below the model context window before compaction triggers. */
|
|
254
|
+
reserveTokens: number;
|
|
255
|
+
/** Approximate recent-transcript tokens kept verbatim through compaction. */
|
|
256
|
+
keepRecentTokens: number;
|
|
257
|
+
/** Character cap applied to tool-result bodies outside the recent tail. */
|
|
258
|
+
toolResultCapChars: number;
|
|
259
|
+
}
|
|
260
|
+
/** Outcome of a harness transcript trim: the (possibly compacted) continuation plus what happened. */
|
|
261
|
+
export interface HarnessTrimOutcome {
|
|
262
|
+
continuation: HarnessContinuation;
|
|
263
|
+
/** True when history was summarized (not merely capped). */
|
|
264
|
+
compacted: boolean;
|
|
265
|
+
/** Estimated context tokens before compaction, when compaction ran. */
|
|
266
|
+
tokensBefore?: number;
|
|
267
|
+
/** Number of tool-result bodies capped by the lossless pass. */
|
|
268
|
+
cappedToolResults?: number;
|
|
269
|
+
}
|
|
270
|
+
export interface AgentHarness {
|
|
271
|
+
readonly id: string;
|
|
272
|
+
readonly continuationVersion: number;
|
|
273
|
+
runTurn(input: AgentTurnInput, ctx: AgentHarnessContext): Promise<AgentTurnResult>;
|
|
274
|
+
/**
|
|
275
|
+
* Trim a stored continuation to the given budget before a conversation
|
|
276
|
+
* resume: cap stale tool-result bodies, and summarize older history when
|
|
277
|
+
* the transcript exceeds the model context window minus `reserveTokens`.
|
|
278
|
+
* Optional; harnesses that cannot trim leave the runtime to its fallback
|
|
279
|
+
* (rebuilding context from flattened recent history). Returning undefined
|
|
280
|
+
* means the continuation is not this harness's to trim.
|
|
281
|
+
*/
|
|
282
|
+
trimContinuation?(continuation: HarnessContinuation, budget: HarnessTranscriptBudget, ctx: {
|
|
283
|
+
env: Record<string, string | undefined>;
|
|
284
|
+
modelSpec: string;
|
|
285
|
+
reasoning?: ReasoningLevel | undefined;
|
|
286
|
+
signal?: AbortSignal;
|
|
287
|
+
}): Promise<HarnessTrimOutcome | undefined>;
|
|
288
|
+
}
|
|
289
|
+
/** Classification of a model-call failure surfaced by a harness error. */
|
|
290
|
+
export type ModelErrorClassification = "fatal" | "retryable" | "unknown";
|
|
291
|
+
/**
|
|
292
|
+
* Reads the classification a harness attached to a thrown error, if any.
|
|
293
|
+
* Kept as a duck-typed check so the runtime never imports engine error classes.
|
|
294
|
+
*/
|
|
295
|
+
export declare function modelErrorClassification(error: unknown): ModelErrorClassification | undefined;
|
|
296
|
+
export declare const DEFAULT_MODEL_OUTPUT_MAX_CHARS = 8000;
|
|
297
|
+
/** Bound a tool output for model consumption (large payloads become previews). */
|
|
298
|
+
export declare function boundModelOutput(value: unknown, maxChars?: number): unknown;
|
|
299
|
+
//# sourceMappingURL=harness.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"harness.d.ts","sourceRoot":"","sources":["../src/harness.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAEzE;;;;;;;;;;;;;;;;;GAiBG;AAEH,sEAAsE;AACtE,MAAM,WAAW,qBAAqB;IACpC,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,UAAU,CAAC;IACxB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,UAAU,GAAG,YAAY,CAAC;CACvC;AAED;;;;;;;GAOG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,yEAAyE;AACzE,MAAM,WA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,CAI7F;AAED,eAAO,MAAM,8BAA8B,OAAQ,CAAC;AAEpD,kFAAkF;AAClF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,EAAE,QAAQ,GAAE,MAAuC,GAAG,OAAO,CAO3G"}
|
package/dist/harness.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Reads the classification a harness attached to a thrown error, if any.
|
|
3
|
+
* Kept as a duck-typed check so the runtime never imports engine error classes.
|
|
4
|
+
*/
|
|
5
|
+
export function modelErrorClassification(error) {
|
|
6
|
+
if (!(error instanceof Error))
|
|
7
|
+
return undefined;
|
|
8
|
+
const value = error.classification;
|
|
9
|
+
return value === "fatal" || value === "retryable" || value === "unknown" ? value : undefined;
|
|
10
|
+
}
|
|
11
|
+
export const DEFAULT_MODEL_OUTPUT_MAX_CHARS = 8_000;
|
|
12
|
+
/** Bound a tool output for model consumption (large payloads become previews). */
|
|
13
|
+
export function boundModelOutput(value, maxChars = DEFAULT_MODEL_OUTPUT_MAX_CHARS) {
|
|
14
|
+
const json = JSON.stringify(value ?? null);
|
|
15
|
+
if (json.length <= maxChars)
|
|
16
|
+
return JSON.parse(json);
|
|
17
|
+
return {
|
|
18
|
+
truncated: true,
|
|
19
|
+
preview: json.slice(0, maxChars)
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=harness.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"harness.js","sourceRoot":"","sources":["../src/harness.ts"],"names":[],"mappings":"AAsSA;;;GAGG;AACH,MAAM,UAAU,wBAAwB,CAAC,KAAc;IACrD,IAAI,CAAC,CAAC,KAAK,YAAY,KAAK,CAAC;QAAE,OAAO,SAAS,CAAC;IAChD,MAAM,KAAK,GAAI,KAAsC,CAAC,cAAc,CAAC;IACrE,OAAO,KAAK,KAAK,OAAO,IAAI,KAAK,KAAK,WAAW,IAAI,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AAC/F,CAAC;AAED,MAAM,CAAC,MAAM,8BAA8B,GAAG,KAAK,CAAC;AAEpD,kFAAkF;AAClF,MAAM,UAAU,gBAAgB,CAAC,KAAc,EAAE,WAAmB,8BAA8B;IAChG,MAAM,IAAI,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC;IAC3C,IAAI,IAAI,CAAC,MAAM,IAAI,QAAQ;QAAE,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAY,CAAC;IAChE,OAAO;QACL,SAAS,EAAE,IAAI;QACf,OAAO,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,CAAC;KACjC,CAAC;AACJ,CAAC"}
|