@kitman-sh/sdk 0.7.5 → 0.8.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/build/index.js +10 -11
- package/dist/{chunk-72z6zbfz.js → chunk-160ww64c.js} +668 -185
- package/dist/{chunk-8byx9rx2.js → chunk-36jhc745.js} +195 -76
- package/dist/loop/index.js +43 -1
- package/dist/program/index.js +7 -3
- package/package.json +3 -1
- package/types/packages/core/src/agent-capabilities.d.ts +68 -74
- package/types/packages/core/src/agent-environment.d.ts +26 -26
- package/types/packages/core/src/agent-launch-snapshot.d.ts +1 -1
- package/types/packages/core/src/agent-sandbox-policy.d.ts +15 -0
- package/types/packages/core/src/approval-queue.d.ts +4 -4
- package/types/packages/core/src/audit.d.ts +1 -1
- package/types/packages/core/src/change-delivery.d.ts +1 -1
- package/types/packages/core/src/change-request-review.d.ts +199 -7
- package/types/packages/core/src/change-request.d.ts +43 -12
- package/types/packages/core/src/connection.d.ts +1 -1
- package/types/packages/core/src/context-feedback.d.ts +8 -8
- package/types/packages/core/src/context-pack.d.ts +8 -8
- package/types/packages/core/src/crypto.d.ts +5 -0
- package/types/packages/core/src/data-lifecycle.d.ts +12 -12
- package/types/packages/core/src/decision.d.ts +2 -2
- package/types/packages/core/src/delivery-policy.d.ts +3 -3
- package/types/packages/core/src/enterprise-forge.d.ts +19 -0
- package/types/packages/core/src/epic-delivery.d.ts +1 -1
- package/types/packages/core/src/external-effect.d.ts +2 -2
- package/types/packages/core/src/global-search.d.ts +1 -1
- package/types/packages/core/src/index.d.ts +8 -2
- package/types/packages/core/src/integration.d.ts +58 -57
- package/types/packages/core/src/kit.d.ts +47 -47
- package/types/packages/core/src/live.d.ts +684 -781
- package/types/packages/core/src/loop-layers.d.ts +1 -1
- package/types/packages/core/src/loop-version.d.ts +1 -1
- package/types/packages/core/src/loop.d.ts +73 -67
- package/types/packages/core/src/marketplace.d.ts +127 -0
- package/types/packages/core/src/memory.d.ts +17 -12
- package/types/packages/core/src/my-teams.d.ts +65 -32
- package/types/packages/core/src/notification.d.ts +73 -12
- package/types/packages/core/src/owner.d.ts +15 -0
- package/types/packages/core/src/package-declarations.d.ts +73 -32
- package/types/packages/core/src/package.d.ts +22 -22
- package/types/packages/core/src/personal-development-profile.d.ts +2 -2
- package/types/packages/core/src/proposal.d.ts +25 -25
- package/types/packages/core/src/redaction.d.ts +2 -1
- package/types/packages/core/src/repo-binding.d.ts +19 -10
- package/types/packages/core/src/run-display.d.ts +1 -1
- package/types/packages/core/src/run-file.d.ts +190 -0
- package/types/packages/core/src/run-launch.d.ts +7 -5
- package/types/packages/core/src/run.d.ts +9 -9
- package/types/packages/core/src/runner-eligibility.d.ts +4 -4
- package/types/packages/core/src/runner.d.ts +339 -111
- package/types/packages/core/src/schedule.d.ts +2 -2
- package/types/packages/core/src/scope-directory.d.ts +5 -5
- package/types/packages/core/src/secret.d.ts +9 -9
- package/types/packages/core/src/session.d.ts +2 -2
- package/types/packages/core/src/step-brief.d.ts +10 -3
- package/types/packages/core/src/storage.d.ts +49 -0
- package/types/packages/core/src/sync-kit.d.ts +25 -25
- package/types/packages/core/src/task-detail.d.ts +20 -13
- package/types/packages/core/src/task-execution-record.d.ts +6 -6
- package/types/packages/core/src/task.d.ts +52 -16
- package/types/packages/core/src/team-context.d.ts +33 -0
- package/types/packages/core/src/transcript.d.ts +230 -0
- package/types/packages/core/src/trigger-dispatch.d.ts +2 -2
- package/types/packages/core/src/trust-panel.d.ts +27 -0
- package/types/packages/core/src/work-unit.d.ts +44 -18
- package/types/packages/core/src/workspace.d.ts +77 -6
- package/types/packages/live/src/rpc/runner-client.d.ts +586 -15
- package/types/packages/live/src/rpc/runner-group.d.ts +623 -267
- package/types/packages/sdk/src/loop/activities.d.ts +208 -1
- package/types/packages/sdk/src/loop/config.d.ts +1 -1
- package/types/packages/sdk/src/loop/define.d.ts +8 -2
- package/types/packages/sdk/src/loop/plan.d.ts +2 -2
- package/types/packages/sdk/src/loop/steps.d.ts +2 -2
- package/types/packages/sdk/src/loop/test-loop.d.ts +6 -1
- package/types/packages/sdk/src/program/engine.d.ts +71 -3
- package/types/packages/sdk/src/program/host.d.ts +13 -1
- package/types/packages/core/src/enterprise-code-host.d.ts +0 -18
- package/types/packages/core/src/project.d.ts +0 -66
|
@@ -336,7 +336,7 @@ var AgentSyncProfileSource = Schema5.Union([
|
|
|
336
336
|
teamId: Schema5.optionalKey(Id),
|
|
337
337
|
enabled: Schema5.Boolean
|
|
338
338
|
}),
|
|
339
|
-
Schema5.Struct({ kind: Schema5.Literal("
|
|
339
|
+
Schema5.Struct({ kind: Schema5.Literal("team_kits"), teamId: Id, enabled: Schema5.Boolean })
|
|
340
340
|
]);
|
|
341
341
|
var AgentSyncProfile = Schema5.Struct({
|
|
342
342
|
id: Schema5.optionalKey(Id),
|
|
@@ -394,7 +394,7 @@ var AgentEnvironmentSource = Schema5.Union([
|
|
|
394
394
|
label: Schema5.optionalKey(Schema5.String.check(Schema5.isMinLength(1)))
|
|
395
395
|
}),
|
|
396
396
|
Schema5.Struct({
|
|
397
|
-
kind: Schema5.Literal("
|
|
397
|
+
kind: Schema5.Literal("team_kit"),
|
|
398
398
|
kitId: Id,
|
|
399
399
|
...AgentKitSourceFields,
|
|
400
400
|
provenance: Schema5.optionalKey(Schema5.Union([
|
|
@@ -534,7 +534,7 @@ var AgentEnvironmentSyncPlan = Schema5.Struct({
|
|
|
534
534
|
import * as Schema6 from "effect/Schema";
|
|
535
535
|
import * as Struct6 from "effect/Struct";
|
|
536
536
|
var KitKinds = ["technology", "brand", "domain", "process", "other"];
|
|
537
|
-
var
|
|
537
|
+
var TeamKitProvenanceKinds = ["explicit", "workspace_default", "workspace_mandatory"];
|
|
538
538
|
var KitKind = Schema6.Union([
|
|
539
539
|
Schema6.Literal("technology"),
|
|
540
540
|
Schema6.Literal("brand"),
|
|
@@ -551,8 +551,8 @@ var Kit = Schema6.Struct({
|
|
|
551
551
|
description: Schema6.optionalKey(Schema6.String),
|
|
552
552
|
contentMarkdown: Schema6.String,
|
|
553
553
|
metadata: Schema6.Record(Schema6.String, Schema6.Unknown),
|
|
554
|
-
|
|
555
|
-
provenance: Schema6.Literals(
|
|
554
|
+
teamAttachment: Schema6.optionalKey(Schema6.Struct({
|
|
555
|
+
provenance: Schema6.Literals(TeamKitProvenanceKinds),
|
|
556
556
|
workspaceKitAssignmentId: Schema6.optionalKey(Id),
|
|
557
557
|
policyRevision: Schema6.optionalKey(Schema6.Int.check(Schema6.isGreaterThanOrEqualTo(1))),
|
|
558
558
|
package: Schema6.optionalKey(Schema6.String)
|
|
@@ -731,8 +731,7 @@ var KitVersion = Schema6.Struct({
|
|
|
731
731
|
var KitInstallationScope = Schema6.Union([
|
|
732
732
|
Schema6.Literal("user"),
|
|
733
733
|
Schema6.Literal("workspace"),
|
|
734
|
-
Schema6.Literal("team")
|
|
735
|
-
Schema6.Literal("project")
|
|
734
|
+
Schema6.Literal("team")
|
|
736
735
|
]);
|
|
737
736
|
var KitInstallationBase = Schema6.Struct({
|
|
738
737
|
id: Id,
|
|
@@ -787,7 +786,7 @@ var KitActivation = Schema6.Struct({
|
|
|
787
786
|
activationType: Schema6.Union([
|
|
788
787
|
Schema6.Literal("workspace_default"),
|
|
789
788
|
Schema6.Literal("team_default"),
|
|
790
|
-
Schema6.Literal("
|
|
789
|
+
Schema6.Literal("team_attachment"),
|
|
791
790
|
Schema6.Literal("personal_default"),
|
|
792
791
|
Schema6.Literal("harness")
|
|
793
792
|
]),
|
|
@@ -852,7 +851,7 @@ var KitMarketplacePreviewInput = Schema6.Struct({
|
|
|
852
851
|
activationType: Schema6.optionalKey(Schema6.Union([
|
|
853
852
|
Schema6.Literal("workspace_default"),
|
|
854
853
|
Schema6.Literal("team_default"),
|
|
855
|
-
Schema6.Literal("
|
|
854
|
+
Schema6.Literal("team_attachment"),
|
|
856
855
|
Schema6.Literal("personal_default"),
|
|
857
856
|
Schema6.Literal("harness")
|
|
858
857
|
]))
|
|
@@ -919,18 +918,18 @@ var KitList = Schema6.Struct({
|
|
|
919
918
|
policyRevision: Schema6.Int.check(Schema6.isGreaterThanOrEqualTo(1))
|
|
920
919
|
})))
|
|
921
920
|
});
|
|
922
|
-
var
|
|
921
|
+
var TeamKitAttachResult = Schema6.Struct({
|
|
923
922
|
status: Schema6.Union([Schema6.Literal("attached"), Schema6.Literal("already_attached")]),
|
|
924
|
-
|
|
923
|
+
teamId: Id,
|
|
925
924
|
kitId: Id
|
|
926
925
|
});
|
|
927
|
-
var
|
|
926
|
+
var TeamKitDetachResult = Schema6.Struct({
|
|
928
927
|
status: Schema6.Union([Schema6.Literal("detached"), Schema6.Literal("not_attached")]),
|
|
929
|
-
|
|
928
|
+
teamId: Id,
|
|
930
929
|
kitId: Id
|
|
931
930
|
});
|
|
932
931
|
var WorkspacePolicyKitMode = Schema6.Union([Schema6.Literal("default"), Schema6.Literal("mandatory")]);
|
|
933
|
-
var
|
|
932
|
+
var TeamKitProvenanceKind = Schema6.Union([
|
|
934
933
|
Schema6.Literal("explicit"),
|
|
935
934
|
Schema6.Literal("workspace_default"),
|
|
936
935
|
Schema6.Literal("workspace_mandatory")
|
|
@@ -973,10 +972,10 @@ var WorkspacePolicyKitAssignmentDeleteResult = Schema6.Struct({
|
|
|
973
972
|
deleted: Schema6.Boolean,
|
|
974
973
|
assignmentId: Id
|
|
975
974
|
});
|
|
976
|
-
var
|
|
975
|
+
var TeamKitPolicyOverride = Schema6.Struct({
|
|
977
976
|
id: Id,
|
|
978
977
|
workspaceId: Id,
|
|
979
|
-
|
|
978
|
+
teamId: Id,
|
|
980
979
|
workspaceKitAssignmentId: Id,
|
|
981
980
|
kind: Schema6.Literal("opt_out"),
|
|
982
981
|
reason: Schema6.optionalKey(Schema6.String),
|
|
@@ -984,20 +983,20 @@ var ProjectKitPolicyOverride = Schema6.Struct({
|
|
|
984
983
|
createdByActorId: Id,
|
|
985
984
|
createdAt: Timestamp
|
|
986
985
|
});
|
|
987
|
-
var
|
|
986
|
+
var TeamKitPolicyOverrideCreate = Schema6.Struct({
|
|
988
987
|
expectedRevision: Schema6.Int.check(Schema6.isGreaterThanOrEqualTo(1)),
|
|
989
988
|
reason: Schema6.optionalKey(Schema6.String.check(Schema6.isMinLength(1), Schema6.isMaxLength(1000)))
|
|
990
989
|
});
|
|
991
|
-
var
|
|
990
|
+
var TeamKitPolicyOverrideDelete = Schema6.Struct({
|
|
992
991
|
expectedRevision: Schema6.Int.check(Schema6.isGreaterThanOrEqualTo(1))
|
|
993
992
|
});
|
|
994
|
-
var
|
|
993
|
+
var TeamKitPolicyOverrideDeleteResult = Schema6.Struct({
|
|
995
994
|
deleted: Schema6.Boolean,
|
|
996
|
-
|
|
995
|
+
teamId: Id,
|
|
997
996
|
workspaceKitAssignmentId: Id
|
|
998
997
|
});
|
|
999
|
-
var
|
|
1000
|
-
|
|
998
|
+
var TeamPolicyKitConvergenceResult = Schema6.Struct({
|
|
999
|
+
teamId: Id,
|
|
1001
1000
|
state: Schema6.Union([Schema6.Literal("current"), Schema6.Literal("degraded")]),
|
|
1002
1001
|
highestPolicyRevision: Schema6.Int.check(Schema6.isGreaterThanOrEqualTo(0)),
|
|
1003
1002
|
scanned: Schema6.Int.check(Schema6.isGreaterThanOrEqualTo(0), Schema6.isLessThanOrEqualTo(100)),
|
|
@@ -1009,7 +1008,7 @@ var ProjectPolicyKitConvergenceResult = Schema6.Struct({
|
|
|
1009
1008
|
repairAvailable: Schema6.Boolean,
|
|
1010
1009
|
nextCursor: Schema6.optionalKey(Id)
|
|
1011
1010
|
});
|
|
1012
|
-
var
|
|
1011
|
+
var TeamPolicyKitConvergenceInput = Schema6.Struct({ cursor: Schema6.optionalKey(Id) });
|
|
1013
1012
|
var WorkspacePolicyKitBackfillPreviewKinds = [
|
|
1014
1013
|
"affected",
|
|
1015
1014
|
"unchanged",
|
|
@@ -1042,8 +1041,8 @@ var WorkspacePolicyKitBackfillCounts = Schema6.Struct({
|
|
|
1042
1041
|
cancelled: Schema6.Int.check(Schema6.isGreaterThanOrEqualTo(0))
|
|
1043
1042
|
});
|
|
1044
1043
|
var WorkspacePolicyKitBackfillItem = Schema6.Struct({
|
|
1045
|
-
|
|
1046
|
-
|
|
1044
|
+
teamId: Id,
|
|
1045
|
+
teamName: Schema6.String,
|
|
1047
1046
|
previewKind: WorkspacePolicyKitBackfillPreviewKind,
|
|
1048
1047
|
applyStatus: WorkspacePolicyKitBackfillApplyStatus,
|
|
1049
1048
|
attempts: Schema6.Int.check(Schema6.isGreaterThanOrEqualTo(0)),
|
|
@@ -1082,7 +1081,7 @@ var WorkspacePolicyKitBackfillCancelResult = Schema6.Struct({
|
|
|
1082
1081
|
});
|
|
1083
1082
|
|
|
1084
1083
|
// packages/core/src/loop-layers.ts
|
|
1085
|
-
var LoopLayers = ["
|
|
1084
|
+
var LoopLayers = ["team", "workspace", "shipped"];
|
|
1086
1085
|
var AgentEfforts = ["low", "medium", "high", "xhigh"];
|
|
1087
1086
|
|
|
1088
1087
|
// packages/core/src/loop.ts
|
|
@@ -1093,7 +1092,7 @@ import * as Schema12 from "effect/Schema";
|
|
|
1093
1092
|
import * as Schema7 from "effect/Schema";
|
|
1094
1093
|
var ContextPackIndexEntryKinds = [
|
|
1095
1094
|
"task",
|
|
1096
|
-
"
|
|
1095
|
+
"team",
|
|
1097
1096
|
"kit",
|
|
1098
1097
|
"memory",
|
|
1099
1098
|
"decision",
|
|
@@ -1129,7 +1128,7 @@ var ContextPackRetrievalRefKind = Schema7.Literals(ContextPackRetrievalRefKinds)
|
|
|
1129
1128
|
var ContextPackLaunchBrief = Schema7.Struct({
|
|
1130
1129
|
mode: ContextPackMode,
|
|
1131
1130
|
taskTitle: Schema7.String.check(Schema7.isMinLength(1)),
|
|
1132
|
-
|
|
1131
|
+
teamName: Schema7.optionalKey(Schema7.String.check(Schema7.isMinLength(1))),
|
|
1133
1132
|
summary: Schema7.String.check(Schema7.isMinLength(1))
|
|
1134
1133
|
});
|
|
1135
1134
|
var ContextPackIndexEntry = Schema7.Struct({
|
|
@@ -1167,7 +1166,7 @@ var ContextPackBudget = Schema7.Struct({
|
|
|
1167
1166
|
var ContextPack = Schema7.Struct({
|
|
1168
1167
|
contextPackId: Id,
|
|
1169
1168
|
workspaceId: Id,
|
|
1170
|
-
|
|
1169
|
+
teamId: Schema7.optionalKey(Id),
|
|
1171
1170
|
taskId: Id,
|
|
1172
1171
|
mode: ContextPackMode,
|
|
1173
1172
|
contentMarkdown: Schema7.String.check(Schema7.isMinLength(1)),
|
|
@@ -1281,7 +1280,7 @@ class DurableSurfaceScanError extends Data.TaggedError("DurableSurfaceScanError"
|
|
|
1281
1280
|
}
|
|
1282
1281
|
var LIVE_CANONICAL_ID_KEYS = new Set([
|
|
1283
1282
|
"workspace_id",
|
|
1284
|
-
"
|
|
1283
|
+
"team_id",
|
|
1285
1284
|
"task_id",
|
|
1286
1285
|
"session_id",
|
|
1287
1286
|
"step_attempt_id",
|
|
@@ -1428,7 +1427,7 @@ var AgentProvenance = Schema9.Struct({
|
|
|
1428
1427
|
source: Schema9.Union([
|
|
1429
1428
|
Schema9.Literal("kitman"),
|
|
1430
1429
|
Schema9.Literal("workspace"),
|
|
1431
|
-
Schema9.Literal("
|
|
1430
|
+
Schema9.Literal("team"),
|
|
1432
1431
|
Schema9.Literal("git"),
|
|
1433
1432
|
Schema9.Literal("package"),
|
|
1434
1433
|
Schema9.Literal("import")
|
|
@@ -1442,7 +1441,7 @@ var Agent = Schema9.Struct({
|
|
|
1442
1441
|
contractVersion: RunContractVersion,
|
|
1443
1442
|
id: Id,
|
|
1444
1443
|
workspaceId: Id,
|
|
1445
|
-
|
|
1444
|
+
teamId: Schema9.optionalKey(Id),
|
|
1446
1445
|
name: Schema9.String.check(Schema9.isMinLength(1), Schema9.isMaxLength(160)),
|
|
1447
1446
|
slug: Schema9.String.check(Schema9.isMinLength(1), Schema9.isMaxLength(160), Schema9.isPattern(new RegExp("^[a-z0-9]+(?:-[a-z0-9]+)*$", "u"))),
|
|
1448
1447
|
currentVersion: Schema9.optionalKey(Schema9.Int.check(Schema9.isGreaterThanOrEqualTo(1))),
|
|
@@ -1556,7 +1555,7 @@ var RunMessage = Schema9.Struct({
|
|
|
1556
1555
|
contractVersion: RunContractVersion,
|
|
1557
1556
|
id: Id,
|
|
1558
1557
|
workspaceId: Id,
|
|
1559
|
-
|
|
1558
|
+
teamId: Schema9.optionalKey(Id),
|
|
1560
1559
|
rootRunId: Id,
|
|
1561
1560
|
sender: Schema9.Union([
|
|
1562
1561
|
Schema9.Struct({ kind: Schema9.Union([Schema9.Literal("run"), Schema9.Literal("step_attempt")]), id: Id }),
|
|
@@ -1588,7 +1587,7 @@ var RunResult = Schema9.Struct({
|
|
|
1588
1587
|
contractVersion: RunContractVersion,
|
|
1589
1588
|
id: Id,
|
|
1590
1589
|
workspaceId: Id,
|
|
1591
|
-
|
|
1590
|
+
teamId: Schema9.optionalKey(Id),
|
|
1592
1591
|
runId: Id,
|
|
1593
1592
|
rootRunId: Id,
|
|
1594
1593
|
attempt: Schema9.Int.check(Schema9.isGreaterThanOrEqualTo(1)),
|
|
@@ -1631,7 +1630,7 @@ var RunEvent = Schema9.Struct({
|
|
|
1631
1630
|
streamId: Id,
|
|
1632
1631
|
sequence: Schema9.Int.check(Schema9.isGreaterThanOrEqualTo(1)),
|
|
1633
1632
|
workspaceId: Id,
|
|
1634
|
-
|
|
1633
|
+
teamId: Schema9.optionalKey(Id),
|
|
1635
1634
|
subject: RunResourceRef,
|
|
1636
1635
|
rootRunId: Id,
|
|
1637
1636
|
type: Schema9.String.check(Schema9.isMinLength(1), Schema9.isMaxLength(100)),
|
|
@@ -1656,7 +1655,7 @@ var Wait = Schema9.Struct({
|
|
|
1656
1655
|
contractVersion: RunContractVersion,
|
|
1657
1656
|
id: Id,
|
|
1658
1657
|
workspaceId: Id,
|
|
1659
|
-
|
|
1658
|
+
teamId: Schema9.optionalKey(Id),
|
|
1660
1659
|
runId: Id,
|
|
1661
1660
|
rootRunId: Id,
|
|
1662
1661
|
stepKey: Schema9.optionalKey(Schema9.String.check(Schema9.isMinLength(1), Schema9.isMaxLength(160))),
|
|
@@ -1719,7 +1718,7 @@ var ControlCommand = Schema9.Struct({
|
|
|
1719
1718
|
contractVersion: RunContractVersion,
|
|
1720
1719
|
id: Id,
|
|
1721
1720
|
workspaceId: Id,
|
|
1722
|
-
|
|
1721
|
+
teamId: Schema9.optionalKey(Id),
|
|
1723
1722
|
target: RunResourceRef,
|
|
1724
1723
|
kind: ControlCommandKind,
|
|
1725
1724
|
payload: Schema9.Struct({ kind: ControlCommandKind, data: SafeJson }),
|
|
@@ -1745,7 +1744,7 @@ var RunCommandCenterSnapshot = Schema9.Struct({
|
|
|
1745
1744
|
scope: Schema9.Struct({
|
|
1746
1745
|
kind: Schema9.Literal("run"),
|
|
1747
1746
|
workspaceId: Id,
|
|
1748
|
-
|
|
1747
|
+
teamId: Schema9.optionalKey(Id),
|
|
1749
1748
|
runId: Id
|
|
1750
1749
|
}),
|
|
1751
1750
|
capturedAt: Timestamp,
|
|
@@ -1815,14 +1814,14 @@ var ProposalTargetTypes = [
|
|
|
1815
1814
|
"agent_environment_policy",
|
|
1816
1815
|
"decision",
|
|
1817
1816
|
"task",
|
|
1818
|
-
"
|
|
1817
|
+
"team_context",
|
|
1819
1818
|
"context_relevance",
|
|
1820
1819
|
...KitMarketplaceProposalTargetTypes
|
|
1821
1820
|
];
|
|
1822
1821
|
var ProposalRiskLevels = ["low", "medium", "high"];
|
|
1823
1822
|
var ProposalApprovalPolicyModes = [
|
|
1824
1823
|
"auto_approve_low_risk",
|
|
1825
|
-
"
|
|
1824
|
+
"require_other_team_member",
|
|
1826
1825
|
"require_workspace_owner_or_admin"
|
|
1827
1826
|
];
|
|
1828
1827
|
var ProposalPolicyViolationCodes = [
|
|
@@ -1846,7 +1845,7 @@ var ProposalRenderedDiffRefKinds = [
|
|
|
1846
1845
|
"agent_environment_policy",
|
|
1847
1846
|
"decision",
|
|
1848
1847
|
"task",
|
|
1849
|
-
"
|
|
1848
|
+
"team_context",
|
|
1850
1849
|
"context_relevance",
|
|
1851
1850
|
...KitMarketplaceProposalTargetTypes,
|
|
1852
1851
|
"session",
|
|
@@ -1934,18 +1933,13 @@ var ProposalPayload = Schema11.Struct({
|
|
|
1934
1933
|
agent_environment_policy: Schema11.optionalKey(ProposalSafeMetadata),
|
|
1935
1934
|
decision: Schema11.optionalKey(ProposalSafeMetadata),
|
|
1936
1935
|
task: Schema11.optionalKey(ProposalSafeMetadata),
|
|
1937
|
-
|
|
1936
|
+
team_context: Schema11.optionalKey(ProposalSafeMetadata),
|
|
1938
1937
|
context_relevance: Schema11.optionalKey(ProposalSafeMetadata)
|
|
1939
1938
|
});
|
|
1940
1939
|
var ProposalTargetRef = Schema11.Struct({
|
|
1941
1940
|
type: ProposalTargetType,
|
|
1942
1941
|
id: Schema11.optionalKey(Id),
|
|
1943
|
-
scopeType: Schema11.optionalKey(Schema11.Union([
|
|
1944
|
-
Schema11.Literal("workspace"),
|
|
1945
|
-
Schema11.Literal("project"),
|
|
1946
|
-
Schema11.Literal("task"),
|
|
1947
|
-
Schema11.Literal("kit")
|
|
1948
|
-
])),
|
|
1942
|
+
scopeType: Schema11.optionalKey(Schema11.Union([Schema11.Literal("workspace"), Schema11.Literal("team"), Schema11.Literal("task"), Schema11.Literal("kit")])),
|
|
1949
1943
|
scopeId: Schema11.optionalKey(Id)
|
|
1950
1944
|
});
|
|
1951
1945
|
var ProposalApprovalPolicy = Schema11.Struct({
|
|
@@ -2000,7 +1994,7 @@ var KitMarketplaceProposalReview = Schema11.Struct({
|
|
|
2000
1994
|
var Proposal = Schema11.Struct({
|
|
2001
1995
|
id: Id,
|
|
2002
1996
|
workspaceId: Id,
|
|
2003
|
-
|
|
1997
|
+
teamId: Schema11.optionalKey(Id),
|
|
2004
1998
|
taskId: Schema11.optionalKey(Id),
|
|
2005
1999
|
target: ProposalTargetRef,
|
|
2006
2000
|
title: Schema11.String.check(Schema11.isMinLength(1), Schema11.isMaxLength(240), Schema11.isPattern(new RegExp(ProposalSafeStringPattern, "u"))),
|
|
@@ -2118,20 +2112,20 @@ var QuestionStatuses = [
|
|
|
2118
2112
|
var LoopGuardSources = [
|
|
2119
2113
|
"trigger_event",
|
|
2120
2114
|
"task",
|
|
2121
|
-
"
|
|
2115
|
+
"team",
|
|
2122
2116
|
"proposal",
|
|
2123
2117
|
"decision",
|
|
2124
2118
|
"step_attempt",
|
|
2125
2119
|
"change_request",
|
|
2126
2120
|
"context_feedback",
|
|
2127
2121
|
"run",
|
|
2128
|
-
"
|
|
2122
|
+
"team_policy"
|
|
2129
2123
|
];
|
|
2130
2124
|
var LoopSourceModes = ["direct", "git_backed"];
|
|
2131
2125
|
var LoopGuardOperators = ["equals", "not_equals", "in", "not_in", "exists", "not_exists"];
|
|
2132
2126
|
var LoopCapabilityScopeKinds = [
|
|
2133
2127
|
"workspace",
|
|
2134
|
-
"
|
|
2128
|
+
"team",
|
|
2135
2129
|
"task",
|
|
2136
2130
|
"change_request",
|
|
2137
2131
|
"step_attempt",
|
|
@@ -2208,7 +2202,7 @@ var LoopCapabilityKinds = [
|
|
|
2208
2202
|
"propose_kit",
|
|
2209
2203
|
"propose_decision",
|
|
2210
2204
|
"propose_agent_environment_policy",
|
|
2211
|
-
"
|
|
2205
|
+
"propose_team_context",
|
|
2212
2206
|
"propose_context_relevance",
|
|
2213
2207
|
"execute_runner_sandbox"
|
|
2214
2208
|
];
|
|
@@ -2617,6 +2611,7 @@ var RunEvidence = Schema12.Struct({
|
|
|
2617
2611
|
tree: Schema12.String,
|
|
2618
2612
|
durationMs: Schema12.Int.check(Schema12.isGreaterThanOrEqualTo(0)),
|
|
2619
2613
|
outputTail: Schema12.String,
|
|
2614
|
+
fileIds: Schema12.optionalKey(Schema12.Array(Schema12.String)),
|
|
2620
2615
|
recordedAt: Timestamp
|
|
2621
2616
|
});
|
|
2622
2617
|
var ApprovedVerification = Schema12.Struct({
|
|
@@ -2633,7 +2628,7 @@ var BundleDigest = Schema12.String.check(Schema12.isMinLength(64), Schema12.isMa
|
|
|
2633
2628
|
var RunArtifact = Schema12.Struct({
|
|
2634
2629
|
id: Id,
|
|
2635
2630
|
runId: Id,
|
|
2636
|
-
|
|
2631
|
+
teamId: Schema12.optionalKey(Id),
|
|
2637
2632
|
taskId: Schema12.optionalKey(Id),
|
|
2638
2633
|
step: Schema12.String,
|
|
2639
2634
|
kind: Schema12.String,
|
|
@@ -2668,7 +2663,7 @@ var RunAlignment = Schema12.Struct({
|
|
|
2668
2663
|
var Run = Schema12.Struct({
|
|
2669
2664
|
id: Id,
|
|
2670
2665
|
workspaceId: Id,
|
|
2671
|
-
|
|
2666
|
+
teamId: Schema12.optionalKey(Id),
|
|
2672
2667
|
taskId: Schema12.optionalKey(Id),
|
|
2673
2668
|
sessionId: Schema12.optionalKey(Id),
|
|
2674
2669
|
loopId: Id,
|
|
@@ -2678,7 +2673,7 @@ var Run = Schema12.Struct({
|
|
|
2678
2673
|
trigger: RunTrigger,
|
|
2679
2674
|
state: RunState,
|
|
2680
2675
|
loopDigest: Schema12.optionalKey(BundleDigest),
|
|
2681
|
-
loopLayer: Schema12.optionalKey(Schema12.Literals(["
|
|
2676
|
+
loopLayer: Schema12.optionalKey(Schema12.Literals(["team", "workspace", "shipped"])),
|
|
2682
2677
|
parentRunId: Schema12.optionalKey(Id),
|
|
2683
2678
|
waiting: Schema12.optionalKey(Schema12.Array(RunWaiting)),
|
|
2684
2679
|
output: Schema12.optionalKey(Schema12.Unknown),
|
|
@@ -2691,7 +2686,7 @@ var Run = Schema12.Struct({
|
|
|
2691
2686
|
updatedAt: Timestamp
|
|
2692
2687
|
});
|
|
2693
2688
|
var StepAttemptInputKinds = ["kit", "memory", "decision", "knowledge_record", "context_pack"];
|
|
2694
|
-
var StepAttemptInputScopeKinds = ["workspace", "
|
|
2689
|
+
var StepAttemptInputScopeKinds = ["workspace", "team", "task", "loop", "agent"];
|
|
2695
2690
|
var StepAttemptInputKind = Schema12.Literals(StepAttemptInputKinds);
|
|
2696
2691
|
var StepAttemptInputScopeKind = Schema12.Literals(StepAttemptInputScopeKinds);
|
|
2697
2692
|
var StepAttemptInputScope = Schema12.Struct({
|
|
@@ -2803,7 +2798,7 @@ var StepOutputSubmissionResult = Schema12.Union([
|
|
|
2803
2798
|
var StepAttempt = Schema12.Struct({
|
|
2804
2799
|
id: Id,
|
|
2805
2800
|
workspaceId: Id,
|
|
2806
|
-
|
|
2801
|
+
teamId: Schema12.optionalKey(Id),
|
|
2807
2802
|
taskId: Schema12.optionalKey(Id),
|
|
2808
2803
|
sessionId: Schema12.optionalKey(Id),
|
|
2809
2804
|
runId: Id,
|
|
@@ -2842,7 +2837,7 @@ var QuestionAnswer = Schema12.Struct({
|
|
|
2842
2837
|
var Question = Schema12.Struct({
|
|
2843
2838
|
id: Id,
|
|
2844
2839
|
workspaceId: Id,
|
|
2845
|
-
|
|
2840
|
+
teamId: Schema12.optionalKey(Id),
|
|
2846
2841
|
taskId: Schema12.optionalKey(Id),
|
|
2847
2842
|
runId: Id,
|
|
2848
2843
|
stepKey: Schema12.String.check(Schema12.isMinLength(1), Schema12.isMaxLength(240)),
|
|
@@ -2865,7 +2860,7 @@ var QuestionAnswerCreate = Schema12.Struct({
|
|
|
2865
2860
|
});
|
|
2866
2861
|
var QuestionList = Schema12.Struct({ items: Schema12.Array(Question) });
|
|
2867
2862
|
var RunLaunchContext = Schema12.Struct({
|
|
2868
|
-
|
|
2863
|
+
teamId: Schema12.optionalKey(Id),
|
|
2869
2864
|
remoteUrl: Schema12.optionalKey(Schema12.String.check(Schema12.isMinLength(1), Schema12.isMaxLength(2000))),
|
|
2870
2865
|
repoBindingId: Schema12.optionalKey(Id),
|
|
2871
2866
|
branch: Schema12.optionalKey(Schema12.String.check(Schema12.isMinLength(1), Schema12.isMaxLength(255)))
|
|
@@ -2874,6 +2869,7 @@ var RunStart = Schema12.Struct({
|
|
|
2874
2869
|
workspaceId: Id,
|
|
2875
2870
|
loop: Schema12.optionalKey(Schema12.String.check(Schema12.isMinLength(1), Schema12.isMaxLength(120))),
|
|
2876
2871
|
words: Schema12.optionalKey(Schema12.String.check(Schema12.isMinLength(1), Schema12.isMaxLength(4000))),
|
|
2872
|
+
plainWords: Schema12.optionalKey(Schema12.Boolean),
|
|
2877
2873
|
task: Schema12.optionalKey(Schema12.String.check(Schema12.isMinLength(1), Schema12.isMaxLength(200))),
|
|
2878
2874
|
teamId: Schema12.optionalKey(Id),
|
|
2879
2875
|
taskTypeId: Schema12.optionalKey(Id),
|
|
@@ -3007,7 +3003,7 @@ var RunStartPreview = Schema12.Struct({
|
|
|
3007
3003
|
inputSchema: Schema12.Record(Schema12.String, Schema12.Unknown),
|
|
3008
3004
|
input: Schema12.Record(Schema12.String, Schema12.Unknown),
|
|
3009
3005
|
missing: Schema12.Array(Schema12.String),
|
|
3010
|
-
|
|
3006
|
+
teamId: Schema12.optionalKey(Id),
|
|
3011
3007
|
inferred: Schema12.Struct({
|
|
3012
3008
|
repoBindingId: Schema12.optionalKey(Id),
|
|
3013
3009
|
branch: Schema12.optionalKey(Schema12.String),
|
|
@@ -3019,7 +3015,7 @@ var RunStartPreview = Schema12.Struct({
|
|
|
3019
3015
|
var ProgramLoop = Schema12.Struct({
|
|
3020
3016
|
id: Schema12.String,
|
|
3021
3017
|
title: Schema12.String,
|
|
3022
|
-
layer: Schema12.Literals(["
|
|
3018
|
+
layer: Schema12.Literals(["team", "workspace", "shipped"]),
|
|
3023
3019
|
digest: Schema12.String,
|
|
3024
3020
|
outcome: Schema12.optionalKey(Schema12.String),
|
|
3025
3021
|
offers: Schema12.Array(Schema12.Struct({ id: Schema12.String, title: Schema12.String, loop: Schema12.String })),
|
|
@@ -3029,7 +3025,7 @@ var ProgramLoop = Schema12.Struct({
|
|
|
3029
3025
|
var AutomaticStart = Schema12.Struct({
|
|
3030
3026
|
eventId: Schema12.String,
|
|
3031
3027
|
eventType: Schema12.String,
|
|
3032
|
-
|
|
3028
|
+
teamId: Schema12.Union([Schema12.String, Schema12.Null]),
|
|
3033
3029
|
loop: Schema12.String,
|
|
3034
3030
|
runId: Schema12.optionalKey(Schema12.String),
|
|
3035
3031
|
rejection: Schema12.optionalKey(Schema12.String),
|
|
@@ -3038,7 +3034,7 @@ var AutomaticStart = Schema12.Struct({
|
|
|
3038
3034
|
var AutomaticStartList = Schema12.Struct({ items: Schema12.Array(AutomaticStart) });
|
|
3039
3035
|
var ProgramAgent = Schema12.Struct({
|
|
3040
3036
|
id: Schema12.String,
|
|
3041
|
-
layer: Schema12.Literals(["
|
|
3037
|
+
layer: Schema12.Literals(["team", "workspace", "shipped"]),
|
|
3042
3038
|
package: Schema12.String,
|
|
3043
3039
|
extends: Schema12.optionalKey(Schema12.String),
|
|
3044
3040
|
instructions: Schema12.optionalKey(Schema12.String),
|
|
@@ -3157,7 +3153,7 @@ var ScheduleVersion = Schema13.Struct({
|
|
|
3157
3153
|
id: Schema13.String.check(Schema13.isMinLength(1)),
|
|
3158
3154
|
scheduleId: Schema13.String.check(Schema13.isMinLength(1)),
|
|
3159
3155
|
workspaceId: Schema13.String.check(Schema13.isMinLength(1)),
|
|
3160
|
-
|
|
3156
|
+
teamId: Schema13.optionalKey(Schema13.String.check(Schema13.isMinLength(1))),
|
|
3161
3157
|
loopId: Schema13.optionalKey(Schema13.String.check(Schema13.isMinLength(1))),
|
|
3162
3158
|
name: Schema13.optionalKey(Schema13.String.check(Schema13.isMinLength(1), Schema13.isMaxLength(200))),
|
|
3163
3159
|
version: Schema13.Int.check(Schema13.isGreaterThanOrEqualTo(1)),
|
|
@@ -3186,7 +3182,11 @@ var LoopCapabilities2 = [
|
|
|
3186
3182
|
"post_comment",
|
|
3187
3183
|
"create_tasks",
|
|
3188
3184
|
"merge_change_request",
|
|
3189
|
-
"publish_release"
|
|
3185
|
+
"publish_release",
|
|
3186
|
+
"read_transcripts",
|
|
3187
|
+
"propose",
|
|
3188
|
+
"read_project",
|
|
3189
|
+
"draft_update"
|
|
3190
3190
|
];
|
|
3191
3191
|
var JsonObject2 = Schema14.Record(Schema14.String, Schema14.Json);
|
|
3192
3192
|
var recordKeyedBy = (pattern, value) => Schema14.Record(Schema14.String, value).check(Schema14.makeFilter((record) => {
|
|
@@ -3211,11 +3211,22 @@ var LoopManifest = Schema14.Struct({
|
|
|
3211
3211
|
offers: Schema14.Array(Schema14.Struct({ id: Schema14.String, title: Schema14.String, loop: Schema14.String })),
|
|
3212
3212
|
capabilities: Schema14.Array(Schema14.Literals(LoopCapabilities2)),
|
|
3213
3213
|
secrets: Schema14.optionalKey(Schema14.Array(SecretName)),
|
|
3214
|
-
network: Schema14.optionalKey(AgentSandboxNetwork)
|
|
3214
|
+
network: Schema14.optionalKey(AgentSandboxNetwork),
|
|
3215
|
+
schedule: Schema14.optionalKey(Schema14.Struct({ rule: ScheduleRule, timezone: Schema14.String }))
|
|
3215
3216
|
});
|
|
3216
3217
|
var LoopDetail = Schema14.Struct({
|
|
3217
3218
|
id: Schema14.String,
|
|
3218
|
-
resolved: Schema14.optionalKey(Schema14.Struct({
|
|
3219
|
+
resolved: Schema14.optionalKey(Schema14.Struct({
|
|
3220
|
+
...ProgramLoop.fields,
|
|
3221
|
+
agents: LoopManifest.fields.agents,
|
|
3222
|
+
when: LoopManifest.fields.when,
|
|
3223
|
+
schedule: Schema14.optionalKey(Schema14.Struct({
|
|
3224
|
+
rule: ScheduleRule,
|
|
3225
|
+
timezone: Schema14.String,
|
|
3226
|
+
on: Schema14.Boolean,
|
|
3227
|
+
nextRunAt: Schema14.optionalKey(Schema14.String)
|
|
3228
|
+
}))
|
|
3229
|
+
}))
|
|
3219
3230
|
});
|
|
3220
3231
|
var AgentDeclaration = Schema14.Struct({
|
|
3221
3232
|
extends: Schema14.optionalKey(Schema14.String),
|
|
@@ -3230,7 +3241,7 @@ var AgentDeclaration = Schema14.Struct({
|
|
|
3230
3241
|
var scheduleFields = {
|
|
3231
3242
|
name: Schema14.String.check(Schema14.isMinLength(1)),
|
|
3232
3243
|
loop: Schema14.String,
|
|
3233
|
-
|
|
3244
|
+
team: Schema14.optionalKey(Schema14.String),
|
|
3234
3245
|
input: Schema14.optionalKey(JsonObject2),
|
|
3235
3246
|
timezone: Schema14.String,
|
|
3236
3247
|
misfire: Schema14.optionalKey(Schema14.Literals(ScheduleMisfirePolicies)),
|
|
@@ -3262,7 +3273,7 @@ var KitInstallationDeclaration = Schema14.Struct({
|
|
|
3262
3273
|
var KitAssignmentDeclaration = Schema14.Struct({
|
|
3263
3274
|
kit: Schema14.String.check(Schema14.isMinLength(1)),
|
|
3264
3275
|
workspace: Schema14.optionalKey(Schema14.Literals(["default", "mandatory"])),
|
|
3265
|
-
|
|
3276
|
+
teams: Schema14.optionalKey(Schema14.Array(Schema14.String))
|
|
3266
3277
|
});
|
|
3267
3278
|
var KitDeclaration = Schema14.Union([
|
|
3268
3279
|
KitInstallationDeclaration,
|
|
@@ -3297,7 +3308,8 @@ var JsonObjectSchema = Schema15.Record(Schema15.String, Schema15.Json);
|
|
|
3297
3308
|
var declarationsAreData = (definition) => Schema15.decodeEffect(JsonObjectSchema)({
|
|
3298
3309
|
agents: definition.agents,
|
|
3299
3310
|
when: definition.when ?? [],
|
|
3300
|
-
offers: definition.offers ?? []
|
|
3311
|
+
offers: definition.offers ?? [],
|
|
3312
|
+
schedule: definition.schedule ?? null
|
|
3301
3313
|
}).pipe(Effect2.mapError((error) => new ManifestInvalid2({ loop: definition.id, message: `Declarations must be data: ${error.message}` })));
|
|
3302
3314
|
var loopManifest2 = (definition) => Effect2.gen(function* () {
|
|
3303
3315
|
yield* declarationsAreData(definition);
|
|
@@ -3313,7 +3325,8 @@ var loopManifest2 = (definition) => Effect2.gen(function* () {
|
|
|
3313
3325
|
offers: definition.offers ?? [],
|
|
3314
3326
|
capabilities: definition.capabilities,
|
|
3315
3327
|
...definition.secrets === undefined ? undefined : { secrets: definition.secrets },
|
|
3316
|
-
...definition.network === undefined ? undefined : { network: definition.network }
|
|
3328
|
+
...definition.network === undefined ? undefined : { network: definition.network },
|
|
3329
|
+
...definition.schedule === undefined ? undefined : { schedule: definition.schedule }
|
|
3317
3330
|
};
|
|
3318
3331
|
});
|
|
3319
3332
|
// packages/sdk/src/loop/steps.ts
|
|
@@ -3595,6 +3608,7 @@ var suggestVerification2 = (name, verification) => takeStep2(name, "ask", "ask",
|
|
|
3595
3608
|
import * as Context2 from "effect/Context";
|
|
3596
3609
|
import * as Effect5 from "effect/Effect";
|
|
3597
3610
|
import * as Schema19 from "effect/Schema";
|
|
3611
|
+
import * as SchemaTransformation from "effect/SchemaTransformation";
|
|
3598
3612
|
import { Activity as Activity2 } from "effect/workflow";
|
|
3599
3613
|
|
|
3600
3614
|
// packages/sdk/src/loop/plan.ts
|
|
@@ -3666,11 +3680,17 @@ var WriteBackRequest2 = Schema19.Struct({
|
|
|
3666
3680
|
milestone: Schema19.optional(Schema19.Literals(WriteBackMilestones2)),
|
|
3667
3681
|
changeRequestUrl: Schema19.optional(Schema19.String)
|
|
3668
3682
|
});
|
|
3683
|
+
var RunFile2 = Schema19.Struct({ runFile: Schema19.String }).pipe(Schema19.decodeTo(Schema19.Struct({ id: Schema19.String }), SchemaTransformation.transform({
|
|
3684
|
+
decode: ({ runFile }) => ({ id: runFile }),
|
|
3685
|
+
encode: ({ id }) => ({ runFile: id })
|
|
3686
|
+
})));
|
|
3687
|
+
var FileRequest2 = Schema19.Struct({ path: Schema19.String, caption: Schema19.optional(Schema19.String) });
|
|
3669
3688
|
var ArtifactRequest2 = Schema19.Struct({
|
|
3670
3689
|
kind: Schema19.String,
|
|
3671
3690
|
title: Schema19.String,
|
|
3672
3691
|
text: Schema19.String,
|
|
3673
|
-
data: Schema19.optional(Schema19.Json)
|
|
3692
|
+
data: Schema19.optional(Schema19.Json),
|
|
3693
|
+
files: Schema19.optional(Schema19.Array(RunFile2))
|
|
3674
3694
|
});
|
|
3675
3695
|
var ArtifactResult2 = Schema19.Struct({ artifactId: Schema19.String });
|
|
3676
3696
|
var NoteRequest2 = Schema19.Struct({ text: Schema19.String, artifactId: Schema19.optional(Schema19.String) });
|
|
@@ -3697,6 +3717,68 @@ var ReleaseRequest2 = Schema19.Struct({
|
|
|
3697
3717
|
notes: Schema19.String
|
|
3698
3718
|
});
|
|
3699
3719
|
var ReleaseResult2 = Schema19.Struct({ tag: Schema19.String, revision: Schema19.String, url: Schema19.String });
|
|
3720
|
+
var TranscriptPoint2 = Schema19.Struct({
|
|
3721
|
+
runId: Schema19.String,
|
|
3722
|
+
stepAttemptId: Schema19.String,
|
|
3723
|
+
sequence: Schema19.Int
|
|
3724
|
+
});
|
|
3725
|
+
var TranscriptsRequest2 = Schema19.Struct({
|
|
3726
|
+
days: Schema19.Int.check(Schema19.isGreaterThanOrEqualTo(1), Schema19.isLessThanOrEqualTo(31))
|
|
3727
|
+
});
|
|
3728
|
+
var TranscriptsResult2 = Schema19.Struct({
|
|
3729
|
+
runs: Schema19.Array(Schema19.Struct({
|
|
3730
|
+
runId: Schema19.String,
|
|
3731
|
+
loopId: Schema19.String,
|
|
3732
|
+
teamId: Schema19.optional(Schema19.String),
|
|
3733
|
+
failure: Schema19.optional(Schema19.String),
|
|
3734
|
+
entries: Schema19.Array(Schema19.Struct({ stepAttemptId: Schema19.String, sequence: Schema19.Int, kind: Schema19.String, text: Schema19.String }))
|
|
3735
|
+
}))
|
|
3736
|
+
});
|
|
3737
|
+
var Citations = Schema19.NonEmptyArray(TranscriptPoint2);
|
|
3738
|
+
var ProposeRequest2 = Schema19.Union([
|
|
3739
|
+
Schema19.Struct({
|
|
3740
|
+
kind: Schema19.Literal("memory"),
|
|
3741
|
+
teamId: Schema19.String,
|
|
3742
|
+
content: Schema19.String,
|
|
3743
|
+
citations: Citations
|
|
3744
|
+
}),
|
|
3745
|
+
Schema19.Struct({
|
|
3746
|
+
kind: Schema19.Literal("task"),
|
|
3747
|
+
title: Schema19.String,
|
|
3748
|
+
description: Schema19.String,
|
|
3749
|
+
teamId: Schema19.optional(Schema19.String),
|
|
3750
|
+
citations: Citations
|
|
3751
|
+
})
|
|
3752
|
+
]);
|
|
3753
|
+
var ProposeResult2 = Schema19.Struct({ kind: Schema19.Literals(["memory", "task"]), id: Schema19.String });
|
|
3754
|
+
var Health = Schema19.Literals(["on_track", "at_risk", "off_track"]);
|
|
3755
|
+
var ProjectActivityRequest2 = Schema19.Struct({ projectId: Schema19.String });
|
|
3756
|
+
var ProjectActivityResult2 = Schema19.Struct({
|
|
3757
|
+
project: Schema19.Struct({ id: Schema19.String, name: Schema19.String }),
|
|
3758
|
+
health: Schema19.optional(Health),
|
|
3759
|
+
since: Schema19.optional(Schema19.String),
|
|
3760
|
+
runs: Schema19.Array(Schema19.Struct({
|
|
3761
|
+
runId: Schema19.String,
|
|
3762
|
+
loopId: Schema19.String,
|
|
3763
|
+
status: Schema19.String,
|
|
3764
|
+
taskKey: Schema19.optional(Schema19.String),
|
|
3765
|
+
taskTitle: Schema19.optional(Schema19.String),
|
|
3766
|
+
summary: Schema19.optional(Schema19.String),
|
|
3767
|
+
entries: Schema19.Array(Schema19.Struct({ stepAttemptId: Schema19.String, sequence: Schema19.Int, kind: Schema19.String, text: Schema19.String }))
|
|
3768
|
+
})),
|
|
3769
|
+
taskChanges: Schema19.Array(Schema19.Struct({ taskKey: Schema19.String, title: Schema19.String, change: Schema19.String, at: Schema19.String }))
|
|
3770
|
+
});
|
|
3771
|
+
var DraftUpdateRequest2 = Schema19.Struct({
|
|
3772
|
+
projectId: Schema19.String,
|
|
3773
|
+
health: Health,
|
|
3774
|
+
note: Schema19.String,
|
|
3775
|
+
writtenFrom: Schema19.Struct({
|
|
3776
|
+
runs: Schema19.Int,
|
|
3777
|
+
taskChanges: Schema19.Int,
|
|
3778
|
+
since: Schema19.optional(Schema19.String)
|
|
3779
|
+
})
|
|
3780
|
+
});
|
|
3781
|
+
var DraftUpdateResult2 = Schema19.Struct({ id: Schema19.String });
|
|
3700
3782
|
|
|
3701
3783
|
class ChangeRequestActivity2 extends Context2.Service()("@kitman-sh/sdk/loop/ChangeRequestActivity") {
|
|
3702
3784
|
}
|
|
@@ -3707,6 +3789,9 @@ class WriteBackActivity2 extends Context2.Service()("@kitman-sh/sdk/loop/WriteBa
|
|
|
3707
3789
|
class ArtifactActivity2 extends Context2.Service()("@kitman-sh/sdk/loop/ArtifactActivity") {
|
|
3708
3790
|
}
|
|
3709
3791
|
|
|
3792
|
+
class FileActivity2 extends Context2.Service()("@kitman-sh/sdk/loop/FileActivity") {
|
|
3793
|
+
}
|
|
3794
|
+
|
|
3710
3795
|
class NoteActivity2 extends Context2.Service()("@kitman-sh/sdk/loop/NoteActivity") {
|
|
3711
3796
|
}
|
|
3712
3797
|
|
|
@@ -3724,6 +3809,18 @@ class MergeChangeRequestActivity2 extends Context2.Service()("@kitman-sh/sdk/loo
|
|
|
3724
3809
|
|
|
3725
3810
|
class ReleaseActivity2 extends Context2.Service()("@kitman-sh/sdk/loop/ReleaseActivity") {
|
|
3726
3811
|
}
|
|
3812
|
+
|
|
3813
|
+
class TranscriptsActivity2 extends Context2.Service()("@kitman-sh/sdk/loop/TranscriptsActivity") {
|
|
3814
|
+
}
|
|
3815
|
+
|
|
3816
|
+
class ProposeActivity2 extends Context2.Service()("@kitman-sh/sdk/loop/ProposeActivity") {
|
|
3817
|
+
}
|
|
3818
|
+
|
|
3819
|
+
class ProjectActivityActivity2 extends Context2.Service()("@kitman-sh/sdk/loop/ProjectActivityActivity") {
|
|
3820
|
+
}
|
|
3821
|
+
|
|
3822
|
+
class DraftUpdateActivity2 extends Context2.Service()("@kitman-sh/sdk/loop/DraftUpdateActivity") {
|
|
3823
|
+
}
|
|
3727
3824
|
var hostActivity = (name, kind, capability, success, execute) => takeStep2(name, kind, capability, Activity2.make({ name: `${kind}/${name}`, success, error: StepFailed2, execute }));
|
|
3728
3825
|
var changeRequest2 = (name, request) => hostActivity(name, "change_request", "change_request", ChangeRequestResult2, Effect5.gen(function* () {
|
|
3729
3826
|
return yield* (yield* ChangeRequestActivity2).run(request, name);
|
|
@@ -3734,6 +3831,9 @@ var writeBack2 = (name, request) => hostActivity(name, "write_back", "write_back
|
|
|
3734
3831
|
var artifact2 = (name, request) => hostActivity(name, "artifact", undefined, ArtifactResult2, Effect5.gen(function* () {
|
|
3735
3832
|
return yield* (yield* ArtifactActivity2).run(request, name);
|
|
3736
3833
|
}));
|
|
3834
|
+
var file2 = (name, request) => hostActivity(name, "file", undefined, RunFile2, Effect5.gen(function* () {
|
|
3835
|
+
return yield* (yield* FileActivity2).run(request, name);
|
|
3836
|
+
}));
|
|
3737
3837
|
var note2 = (name, request) => hostActivity(name, "note", undefined, Schema19.Void, Effect5.gen(function* () {
|
|
3738
3838
|
return yield* (yield* NoteActivity2).run(request, name);
|
|
3739
3839
|
}));
|
|
@@ -3752,6 +3852,18 @@ var mergeChangeRequest2 = (name, request) => hostActivity(name, "merge_change_re
|
|
|
3752
3852
|
var release2 = (name, request) => hostActivity(name, "release", "publish_release", ReleaseResult2, Effect5.gen(function* () {
|
|
3753
3853
|
return yield* (yield* ReleaseActivity2).run(request, name);
|
|
3754
3854
|
}));
|
|
3855
|
+
var transcripts2 = (name, request) => hostActivity(name, "transcripts", "read_transcripts", TranscriptsResult2, Effect5.gen(function* () {
|
|
3856
|
+
return yield* (yield* TranscriptsActivity2).run(request, name);
|
|
3857
|
+
}));
|
|
3858
|
+
var propose2 = (name, request) => hostActivity(name, "propose", "propose", ProposeResult2, Effect5.gen(function* () {
|
|
3859
|
+
return yield* (yield* ProposeActivity2).run(request, name);
|
|
3860
|
+
}));
|
|
3861
|
+
var projectActivity2 = (name, request) => hostActivity(name, "project_activity", "read_project", ProjectActivityResult2, Effect5.gen(function* () {
|
|
3862
|
+
return yield* (yield* ProjectActivityActivity2).run(request, name);
|
|
3863
|
+
}));
|
|
3864
|
+
var draftUpdate2 = (name, request) => hostActivity(name, "draft_update", "draft_update", DraftUpdateResult2, Effect5.gen(function* () {
|
|
3865
|
+
return yield* (yield* DraftUpdateActivity2).run(request, name);
|
|
3866
|
+
}));
|
|
3755
3867
|
// packages/sdk/src/loop/test-loop.ts
|
|
3756
3868
|
import * as ConfigProvider from "effect/ConfigProvider";
|
|
3757
3869
|
import * as Context3 from "effect/Context";
|
|
@@ -3776,6 +3888,7 @@ var defaultActivities = {
|
|
|
3776
3888
|
},
|
|
3777
3889
|
writeBack: { run: () => Effect6.void },
|
|
3778
3890
|
artifact: { run: (request) => Effect6.succeed({ artifactId: request.title }) },
|
|
3891
|
+
file: { run: (_request, step) => Effect6.succeed({ id: `file-${step}` }) },
|
|
3779
3892
|
note: { run: () => Effect6.void },
|
|
3780
3893
|
comment: { run: () => Effect6.void },
|
|
3781
3894
|
createTasks: {
|
|
@@ -3797,7 +3910,13 @@ var defaultActivities = {
|
|
|
3797
3910
|
revision: request.revision ?? "base-head",
|
|
3798
3911
|
url: `test://releases/${request.tag}`
|
|
3799
3912
|
})
|
|
3800
|
-
}
|
|
3913
|
+
},
|
|
3914
|
+
transcripts: { run: () => Effect6.succeed({ runs: [] }) },
|
|
3915
|
+
propose: { run: (request, step) => Effect6.succeed({ kind: request.kind, id: `${request.kind}-${step}` }) },
|
|
3916
|
+
projectActivity: {
|
|
3917
|
+
run: (request) => Effect6.succeed({ project: { id: request.projectId, name: request.projectId }, runs: [], taskChanges: [] })
|
|
3918
|
+
},
|
|
3919
|
+
draftUpdate: { run: (_, step) => Effect6.succeed({ id: `draft-${step}` }) }
|
|
3801
3920
|
};
|
|
3802
3921
|
var withoutServices = (effect) => Effect6.orDie(Effect6.provide(effect, Context3.empty()));
|
|
3803
3922
|
var deferredExit = (deferred) => Schema20.Exit(Schema20.toCodecJson(deferred.successSchema), Schema20.toCodecJson(deferred.errorSchema), Schema20.toCodecJson(Schema20.Defect()));
|
|
@@ -3874,7 +3993,7 @@ var executeLoop2 = (loop, runtime) => ({ input }) => Effect6.gen(function* () {
|
|
|
3874
3993
|
steps: []
|
|
3875
3994
|
});
|
|
3876
3995
|
runtime.onRun?.(run);
|
|
3877
|
-
return yield* loop.run(decoded).pipe(Effect6.provideService(LoopRun2, run), Effect6.provideService(LoopHost2, runtime.host), Effect6.provideService(ChangeRequestActivity2, runtime.activities.changeRequest), Effect6.provideService(WriteBackActivity2, runtime.activities.writeBack), Effect6.provideService(ArtifactActivity2, runtime.activities.artifact), Effect6.provideService(NoteActivity2, runtime.activities.note), Effect6.provideService(CommentActivity2, runtime.activities.comment), Effect6.provideService(CreateTasksActivity2, runtime.activities.createTasks), Effect6.provideService(IntegrationBranchActivity2, runtime.activities.integrationBranch), Effect6.provideService(MergeChangeRequestActivity2, runtime.activities.mergeChangeRequest), Effect6.provideService(ReleaseActivity2, runtime.activities.release));
|
|
3996
|
+
return yield* loop.run(decoded).pipe(Effect6.provideService(LoopRun2, run), Effect6.provideService(LoopHost2, runtime.host), Effect6.provideService(ChangeRequestActivity2, runtime.activities.changeRequest), Effect6.provideService(WriteBackActivity2, runtime.activities.writeBack), Effect6.provideService(ArtifactActivity2, runtime.activities.artifact), Effect6.provideService(FileActivity2, runtime.activities.file), Effect6.provideService(NoteActivity2, runtime.activities.note), Effect6.provideService(CommentActivity2, runtime.activities.comment), Effect6.provideService(CreateTasksActivity2, runtime.activities.createTasks), Effect6.provideService(IntegrationBranchActivity2, runtime.activities.integrationBranch), Effect6.provideService(MergeChangeRequestActivity2, runtime.activities.mergeChangeRequest), Effect6.provideService(ReleaseActivity2, runtime.activities.release), Effect6.provideService(TranscriptsActivity2, runtime.activities.transcripts), Effect6.provideService(ProposeActivity2, runtime.activities.propose), Effect6.provideService(ProjectActivityActivity2, runtime.activities.projectActivity), Effect6.provideService(DraftUpdateActivity2, runtime.activities.draftUpdate));
|
|
3878
3997
|
});
|
|
3879
3998
|
var testLoop2 = (loop, script) => {
|
|
3880
3999
|
const journal = {
|
|
@@ -4046,4 +4165,4 @@ var checkLoop2 = (loop, check) => Effect7.gen(function* () {
|
|
|
4046
4165
|
});
|
|
4047
4166
|
// packages/sdk/src/loop/config.ts
|
|
4048
4167
|
var defineConfig2 = (config) => config;
|
|
4049
|
-
export { AgentSandboxNetwork, guard, Id, Timestamp, LoopStepOutput, StepBrief, LoopCapabilities2, LoopManifest, AgentDeclaration, KitInstallationDeclaration, KitAssignmentDeclaration, PackageDeclarations, LoopOutcome2, defineLoop2, ManifestInvalid2, jsonSchemaOf2, loopManifest2, EvidenceCheck2, VerifyResult2, OutcomeTable2, evidenceGate2, StepFailed2, OutputInvalid2, QuestionRefused2, WaitTimedOut2, ChildFailed2, CapabilityDenied2, DuplicateStep2, InputInvalid2, LoopEvent2, LoopRun2, LoopHost2, agentWorkDeferred2, answerDeferred2, childDeferred2, eventDeferred2, verifyDeferred2, takeStep2, agentWork2, ask2, call2, waitFor2, verify2, suggestVerification2, PlanTicket2, PlanTickets2, BlockingCycle2, planWaves2, ChangeRequestRequest2, ChangeRequestResult2, WriteBackMilestones2, WriteBackRequest2, ArtifactRequest2, ArtifactResult2, NoteRequest2, CreateTasksRequest2, CreateTasksResult2, IntegrationBranchRequest2, IntegrationBranch2, MergeChangeRequestRequest2, MergeResult2, CommentRequest2, ReleaseRequest2, ReleaseResult2, ChangeRequestActivity2, WriteBackActivity2, ArtifactActivity2, NoteActivity2, CommentActivity2, CreateTasksActivity2, IntegrationBranchActivity2, MergeChangeRequestActivity2, ReleaseActivity2, changeRequest2, writeBack2, artifact2, note2, comment2, createTasks2, integrationBranch2, mergeChangeRequest2, release2, LoopJournal2, ScriptedFailure2, scriptedFailure2, loopWorkflow2, executeLoop2, testLoop2, Severity2, Finding2, MergedFinding2, Rebuttal2, RebuttalVerdict2, ScopeJudgement2, isBlocking2, mergeFindings2, splitDisputed2, settleRound2, rallyStop2, CheckFailed2, StepNamedTwice2, ReplayDiverged2, LoopCheckError2, checkLoop2, defineConfig2 };
|
|
4168
|
+
export { AgentSandboxNetwork, Numeric, isWholeNumber, guard, Id, Timestamp, LoopStepOutput, StepBrief, LoopCapabilities2, LoopManifest, AgentDeclaration, KitInstallationDeclaration, KitAssignmentDeclaration, PackageDeclarations, LoopOutcome2, defineLoop2, ManifestInvalid2, jsonSchemaOf2, loopManifest2, EvidenceCheck2, VerifyResult2, OutcomeTable2, evidenceGate2, StepFailed2, OutputInvalid2, QuestionRefused2, WaitTimedOut2, ChildFailed2, CapabilityDenied2, DuplicateStep2, InputInvalid2, LoopEvent2, LoopRun2, LoopHost2, agentWorkDeferred2, answerDeferred2, childDeferred2, eventDeferred2, verifyDeferred2, takeStep2, agentWork2, ask2, call2, waitFor2, verify2, suggestVerification2, PlanTicket2, PlanTickets2, BlockingCycle2, planWaves2, ChangeRequestRequest2, ChangeRequestResult2, WriteBackMilestones2, WriteBackRequest2, RunFile2, FileRequest2, ArtifactRequest2, ArtifactResult2, NoteRequest2, CreateTasksRequest2, CreateTasksResult2, IntegrationBranchRequest2, IntegrationBranch2, MergeChangeRequestRequest2, MergeResult2, CommentRequest2, ReleaseRequest2, ReleaseResult2, TranscriptPoint2, TranscriptsRequest2, TranscriptsResult2, ProposeRequest2, ProposeResult2, ProjectActivityRequest2, ProjectActivityResult2, DraftUpdateRequest2, DraftUpdateResult2, ChangeRequestActivity2, WriteBackActivity2, ArtifactActivity2, FileActivity2, NoteActivity2, CommentActivity2, CreateTasksActivity2, IntegrationBranchActivity2, MergeChangeRequestActivity2, ReleaseActivity2, TranscriptsActivity2, ProposeActivity2, ProjectActivityActivity2, DraftUpdateActivity2, changeRequest2, writeBack2, artifact2, file2, note2, comment2, createTasks2, integrationBranch2, mergeChangeRequest2, release2, transcripts2, propose2, projectActivity2, draftUpdate2, LoopJournal2, ScriptedFailure2, scriptedFailure2, loopWorkflow2, executeLoop2, testLoop2, Severity2, Finding2, MergedFinding2, Rebuttal2, RebuttalVerdict2, ScopeJudgement2, isBlocking2, mergeFindings2, splitDisputed2, settleRound2, rallyStop2, CheckFailed2, StepNamedTwice2, ReplayDiverged2, LoopCheckError2, checkLoop2, defineConfig2 };
|