@narumitw/pi-subagents 1.0.0 → 1.0.1
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 +12 -4
- package/package.json +1 -1
- package/src/automation-registration.ts +137 -0
- package/src/automation-tool.ts +40 -0
- package/src/automation.ts +6 -156
- package/src/cached-module-loader.ts +18 -0
- package/src/config-registration.ts +89 -0
- package/src/config-ui.ts +2 -2
- package/src/consult-registration.ts +132 -0
- package/src/consult-tool.ts +95 -0
- package/src/consult.ts +37 -204
- package/src/create-stateful-transport.ts +106 -18
- package/src/inspect-registration.ts +64 -0
- package/src/inspect-tool.ts +43 -0
- package/src/inspect.ts +7 -69
- package/src/params.ts +1 -1
- package/src/pi-args.ts +41 -0
- package/src/render.ts +2 -6
- package/src/runner-outcome.ts +31 -0
- package/src/runner.ts +18 -79
- package/src/stateful.ts +6 -1
- package/src/subagents.ts +81 -28
- package/src/verified-execution-contract.ts +3 -31
- package/src/verified-execution-schema.ts +32 -0
|
@@ -1,41 +1,13 @@
|
|
|
1
|
-
import { StringEnum } from "@earendil-works/pi-ai";
|
|
2
|
-
import { type Static, Type } from "typebox";
|
|
3
1
|
import { normalizeDelegationContract } from "./delegation-contract.js";
|
|
4
2
|
import {
|
|
5
3
|
type VerificationCheckRequest,
|
|
6
4
|
validateVerificationChecks,
|
|
7
5
|
} from "./verification-harness.js";
|
|
6
|
+
import type { VerifiedExecutionContract } from "./verified-execution-schema.js";
|
|
8
7
|
import type { ResolvedWorkflowTask } from "./workflow-planning.js";
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
id: Type.String({
|
|
13
|
-
minLength: 1,
|
|
14
|
-
maxLength: 256,
|
|
15
|
-
pattern: "^[A-Za-z0-9][A-Za-z0-9._:-]{0,255}$",
|
|
16
|
-
}),
|
|
17
|
-
command: StringEnum(["git", "node", "npm", "npx"] as const),
|
|
18
|
-
args: Type.Optional(Type.Array(Type.String({ maxLength: 4096 }), { maxItems: 64 })),
|
|
19
|
-
cwd: Type.Optional(Type.String({ minLength: 1, maxLength: 4096 })),
|
|
20
|
-
timeoutMs: Type.Optional(Type.Integer({ minimum: 1, maximum: 600_000 })),
|
|
21
|
-
},
|
|
22
|
-
{ additionalProperties: false },
|
|
23
|
-
);
|
|
24
|
-
|
|
25
|
-
export const VerifiedExecutionContractSchema = Type.Object(
|
|
26
|
-
{
|
|
27
|
-
verifierAgent: Type.String({ minLength: 1, maxLength: 256 }),
|
|
28
|
-
maxReworkCycles: Type.Optional(Type.Integer({ minimum: 0, maximum: 1, default: 1 })),
|
|
29
|
-
checks: Type.Optional(Type.Array(VerificationCheckSchema, { maxItems: 32 })),
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
additionalProperties: false,
|
|
33
|
-
description:
|
|
34
|
-
"Explicitly gate mutating workflow success on executor-owned deterministic checks, one least-authority independent verifier, exact submitted-state identity, and managed integration acceptance.",
|
|
35
|
-
},
|
|
36
|
-
);
|
|
37
|
-
|
|
38
|
-
export type VerifiedExecutionContract = Static<typeof VerifiedExecutionContractSchema>;
|
|
9
|
+
export type { VerifiedExecutionContract } from "./verified-execution-schema.js";
|
|
10
|
+
export { VerifiedExecutionContractSchema } from "./verified-execution-schema.js";
|
|
39
11
|
|
|
40
12
|
export interface PreparedVerifiedWorkflow {
|
|
41
13
|
tasks: ResolvedWorkflowTask[];
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { StringEnum } from "@earendil-works/pi-ai";
|
|
2
|
+
import { type Static, Type } from "typebox";
|
|
3
|
+
|
|
4
|
+
const VerificationCheckSchema = Type.Object(
|
|
5
|
+
{
|
|
6
|
+
id: Type.String({
|
|
7
|
+
minLength: 1,
|
|
8
|
+
maxLength: 256,
|
|
9
|
+
pattern: "^[A-Za-z0-9][A-Za-z0-9._:-]{0,255}$",
|
|
10
|
+
}),
|
|
11
|
+
command: StringEnum(["git", "node", "npm", "npx"] as const),
|
|
12
|
+
args: Type.Optional(Type.Array(Type.String({ maxLength: 4096 }), { maxItems: 64 })),
|
|
13
|
+
cwd: Type.Optional(Type.String({ minLength: 1, maxLength: 4096 })),
|
|
14
|
+
timeoutMs: Type.Optional(Type.Integer({ minimum: 1, maximum: 600_000 })),
|
|
15
|
+
},
|
|
16
|
+
{ additionalProperties: false },
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
export const VerifiedExecutionContractSchema = Type.Object(
|
|
20
|
+
{
|
|
21
|
+
verifierAgent: Type.String({ minLength: 1, maxLength: 256 }),
|
|
22
|
+
maxReworkCycles: Type.Optional(Type.Integer({ minimum: 0, maximum: 1, default: 1 })),
|
|
23
|
+
checks: Type.Optional(Type.Array(VerificationCheckSchema, { maxItems: 32 })),
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
additionalProperties: false,
|
|
27
|
+
description:
|
|
28
|
+
"Explicitly gate mutating workflow success on executor-owned deterministic checks, one least-authority independent verifier, exact submitted-state identity, and managed integration acceptance.",
|
|
29
|
+
},
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
export type VerifiedExecutionContract = Static<typeof VerifiedExecutionContractSchema>;
|