@harness-control/protocol 0.2.0 → 0.4.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/accounts.d.ts +312 -0
- package/dist/accounts.js +132 -0
- package/dist/index.d.ts +186 -156
- package/dist/index.js +14 -10
- package/fixtures/conformance/invalid/accounts-negative-quota.json +35 -0
- package/fixtures/conformance/invalid/accounts-secret.json +36 -0
- package/fixtures/conformance/invalid/local-action-lease-binding-mismatch.json +1 -3
- package/fixtures/conformance/invalid/local-action-missing-turn-id.json +0 -1
- package/fixtures/conformance/invalid/local-action-patch-missing-base-hash.json +1 -3
- package/fixtures/conformance/invalid/local-action-shell-missing-approval.json +4 -4
- package/fixtures/conformance/valid/accounts-read.json +11 -0
- package/fixtures/conformance/valid/accounts-snapshot.json +35 -0
- package/fixtures/conformance/valid/accounts-unavailable.json +21 -0
- package/fixtures/conformance/valid/local-action-dev-server-start.json +5 -4
- package/fixtures/conformance/valid/local-action-dev-server-stop.json +1 -3
- package/fixtures/conformance/valid/local-action-error.json +1 -3
- package/fixtures/conformance/valid/local-action-filesystem-list.json +1 -3
- package/fixtures/conformance/valid/local-action-filesystem-patch.json +1 -3
- package/fixtures/conformance/valid/local-action-filesystem-read.json +1 -3
- package/fixtures/conformance/valid/local-action-filesystem-write.json +1 -3
- package/fixtures/conformance/valid/local-action-git-diff.json +4 -4
- package/fixtures/conformance/valid/local-action-git-status.json +1 -3
- package/fixtures/conformance/valid/local-action-response.json +4 -4
- package/fixtures/conformance/valid/local-action-shell-exec.json +4 -4
- package/fixtures/conformance/valid/session-start-with-leases.json +13 -8
- package/package.json +1 -1
- package/schemas/hcp-message.schema.json +391 -244
package/dist/index.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
import { hcpAccountsReadPayloadSchema, hcpAccountsSnapshotPayloadSchema } from "./accounts.js";
|
|
2
|
+
export * from "./accounts.js";
|
|
1
3
|
import { z } from "zod";
|
|
2
4
|
export const HCP_VERSION = "hcp.v0";
|
|
3
5
|
export const HCP_METADATA_MAX_ENCODED_BYTES = 16 * 1024;
|
|
4
6
|
export const HCP_PAYLOAD_MAX_ENCODED_BYTES = 1024 * 1024;
|
|
5
7
|
export const HCP_MESSAGE_MAX_ENCODED_BYTES = HCP_METADATA_MAX_ENCODED_BYTES + HCP_PAYLOAD_MAX_ENCODED_BYTES + 64 * 1024;
|
|
6
8
|
export const HOST_LIFECYCLE_MESSAGE_TYPES = [
|
|
9
|
+
"host.accounts.read",
|
|
10
|
+
"host.accounts.snapshot",
|
|
7
11
|
"host.hello",
|
|
8
12
|
"host.accepted",
|
|
9
13
|
"host.rejected",
|
|
@@ -325,9 +329,11 @@ export const hcpMcpStdioProfileSnapshotSchema = z
|
|
|
325
329
|
export const hcpWorkspaceManagementSchema = z.object({
|
|
326
330
|
revision: z.string().min(1).max(100),
|
|
327
331
|
allowed_roots: z.array(z.string().min(1).max(4096)).max(32),
|
|
332
|
+
directory_browsing: z.literal(true).optional(),
|
|
328
333
|
}).strict();
|
|
329
334
|
export const hcpWorkspaceOperationSchema = z.discriminatedUnion("kind", [
|
|
330
335
|
z.object({ kind: z.literal("list") }).strict(),
|
|
336
|
+
z.object({ kind: z.literal("browse"), path: z.string().min(1).max(4096).optional(), cursor: z.string().min(1).max(4096).optional() }).strict(),
|
|
331
337
|
z.object({ kind: z.literal("add"), path: z.string().min(1).max(4096), display_name: z.string().trim().min(1).max(100) }).strict(),
|
|
332
338
|
z.object({ kind: z.literal("rename"), id: z.string().min(1).max(200), display_name: z.string().trim().min(1).max(100) }).strict(),
|
|
333
339
|
z.object({ kind: z.literal("remove"), id: z.string().min(1).max(200) }).strict(),
|
|
@@ -341,6 +347,10 @@ export const hcpWorkspacesResultPayloadSchema = z.object({
|
|
|
341
347
|
request_id: nonEmptyStringSchema,
|
|
342
348
|
outcome: z.discriminatedUnion("kind", [
|
|
343
349
|
z.object({ kind: z.literal("success") }).strict(),
|
|
350
|
+
z.object({ kind: z.literal("directory"), path: z.string().min(1).max(4096), parent: z.string().min(1).max(4096).optional(),
|
|
351
|
+
entries: z.array(z.object({ name: z.string().min(1).max(4096), path: z.string().min(1).max(4096) }).strict()).max(200),
|
|
352
|
+
next_cursor: z.string().min(1).max(4096).optional(),
|
|
353
|
+
}).strict(),
|
|
344
354
|
z.object({ kind: z.literal("error"), message: z.string().min(1).max(1000) }).strict(),
|
|
345
355
|
]),
|
|
346
356
|
management: hcpWorkspaceManagementSchema,
|
|
@@ -435,11 +445,7 @@ export const localCapabilityGrantSchema = z
|
|
|
435
445
|
export const localCapabilityLeaseSchema = z
|
|
436
446
|
.object({
|
|
437
447
|
lease_id: nonEmptyStringSchema,
|
|
438
|
-
org_id: nonEmptyStringSchema,
|
|
439
448
|
actor_id: nonEmptyStringSchema.optional(),
|
|
440
|
-
workflow_id: nonEmptyStringSchema,
|
|
441
|
-
run_id: nonEmptyStringSchema,
|
|
442
|
-
node_id: nonEmptyStringSchema,
|
|
443
449
|
hcp_session_id: nonEmptyStringSchema,
|
|
444
450
|
execution_host_id: nonEmptyStringSchema,
|
|
445
451
|
provider_instance_id: nonEmptyStringSchema,
|
|
@@ -583,7 +589,6 @@ const localActionAttributionSchema = z
|
|
|
583
589
|
turn_id: nonEmptyStringSchema,
|
|
584
590
|
workspace_id: nonEmptyStringSchema,
|
|
585
591
|
provider_instance_id: nonEmptyStringSchema,
|
|
586
|
-
run_id: nonEmptyStringSchema,
|
|
587
592
|
})
|
|
588
593
|
.strict();
|
|
589
594
|
const localActionLeaseBindingSchema = z
|
|
@@ -591,7 +596,6 @@ const localActionLeaseBindingSchema = z
|
|
|
591
596
|
lease_id: nonEmptyStringSchema,
|
|
592
597
|
capability_id: localActionProtocolCapabilityIdSchema,
|
|
593
598
|
scope: nonEmptyStringSchema,
|
|
594
|
-
run_id: nonEmptyStringSchema,
|
|
595
599
|
hcp_session_id: nonEmptyStringSchema,
|
|
596
600
|
execution_host_id: nonEmptyStringSchema,
|
|
597
601
|
provider_instance_id: nonEmptyStringSchema,
|
|
@@ -1124,9 +1128,6 @@ function refineLocalActionContract(payload, context) {
|
|
|
1124
1128
|
if (payload.attribution.provider_instance_id !== payload.lease.provider_instance_id) {
|
|
1125
1129
|
addLocalActionIssue(context, ["lease", "provider_instance_id"], "Local action lease provider must match request attribution.");
|
|
1126
1130
|
}
|
|
1127
|
-
if (payload.attribution.run_id !== payload.lease.run_id) {
|
|
1128
|
-
addLocalActionIssue(context, ["lease", "run_id"], "Local action lease run must match request attribution.");
|
|
1129
|
-
}
|
|
1130
1131
|
const expectedBinding = localActionExpectedBinding(payload.action);
|
|
1131
1132
|
if (payload.lease.capability_id !== expectedBinding.capabilityId) {
|
|
1132
1133
|
addLocalActionIssue(context, ["lease", "capability_id"], `Action '${payload.action}' must use the ${expectedBinding.capabilityId} capability.`);
|
|
@@ -1387,7 +1388,6 @@ const localCapabilityLeaseEventDataSchema = z
|
|
|
1387
1388
|
const localCapabilityActionEventDataSchema = z
|
|
1388
1389
|
.object({
|
|
1389
1390
|
lease_id: nonEmptyStringSchema,
|
|
1390
|
-
run_id: nonEmptyStringSchema,
|
|
1391
1391
|
workspace_id: nonEmptyStringSchema,
|
|
1392
1392
|
provider_instance_id: nonEmptyStringSchema,
|
|
1393
1393
|
capability_id: nonEmptyStringSchema,
|
|
@@ -1830,7 +1830,11 @@ export const localActionErrorMessageSchema = hcpTypedEnvelopeSchema("local.actio
|
|
|
1830
1830
|
export const hcpHarnessEventMessageSchema = hcpTypedEnvelopeSchema("harness.event", hcpHarnessEventPayloadSchema);
|
|
1831
1831
|
export const hcpWorkspacesRequestMessageSchema = hcpTypedEnvelopeSchema("host.workspaces.request", hcpWorkspacesRequestPayloadSchema);
|
|
1832
1832
|
export const hcpWorkspacesResultMessageSchema = hcpTypedEnvelopeSchema("host.workspaces.result", hcpWorkspacesResultPayloadSchema);
|
|
1833
|
+
export const hcpAccountsReadMessageSchema = hcpTypedEnvelopeSchema("host.accounts.read", hcpAccountsReadPayloadSchema);
|
|
1834
|
+
export const hcpAccountsSnapshotMessageSchema = hcpTypedEnvelopeSchema("host.accounts.snapshot", hcpAccountsSnapshotPayloadSchema);
|
|
1833
1835
|
export const hcpMessageSchema = z.discriminatedUnion("type", [
|
|
1836
|
+
hcpAccountsReadMessageSchema,
|
|
1837
|
+
hcpAccountsSnapshotMessageSchema,
|
|
1834
1838
|
hcpWorkspacesRequestMessageSchema,
|
|
1835
1839
|
hcpWorkspacesResultMessageSchema,
|
|
1836
1840
|
hcpCommandAckMessageSchema,
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "account-fixture",
|
|
3
|
+
"version": "hcp.v0",
|
|
4
|
+
"sent_at": "2026-09-12T00:00:00Z",
|
|
5
|
+
"type": "host.accounts.snapshot",
|
|
6
|
+
"payload": {
|
|
7
|
+
"request_id": "read-1",
|
|
8
|
+
"host_id": "host-1",
|
|
9
|
+
"providers": [
|
|
10
|
+
{
|
|
11
|
+
"provider_instance_id": "codex",
|
|
12
|
+
"observation": {
|
|
13
|
+
"status": "available",
|
|
14
|
+
"observed_at": "2026-09-12T00:00:00Z",
|
|
15
|
+
"account": {
|
|
16
|
+
"key": "account-1",
|
|
17
|
+
"provider": "codex",
|
|
18
|
+
"scope_source": "operator",
|
|
19
|
+
"label": "Work"
|
|
20
|
+
},
|
|
21
|
+
"source": "codex_app_server",
|
|
22
|
+
"limits": [
|
|
23
|
+
{
|
|
24
|
+
"id": "weekly",
|
|
25
|
+
"label": "Weekly",
|
|
26
|
+
"kind": "quota",
|
|
27
|
+
"used_percent": -1,
|
|
28
|
+
"resets_at": "2026-09-19T00:00:00Z"
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "account-fixture",
|
|
3
|
+
"version": "hcp.v0",
|
|
4
|
+
"sent_at": "2026-09-12T00:00:00Z",
|
|
5
|
+
"type": "host.accounts.snapshot",
|
|
6
|
+
"payload": {
|
|
7
|
+
"request_id": "read-1",
|
|
8
|
+
"host_id": "host-1",
|
|
9
|
+
"providers": [
|
|
10
|
+
{
|
|
11
|
+
"provider_instance_id": "codex",
|
|
12
|
+
"observation": {
|
|
13
|
+
"status": "available",
|
|
14
|
+
"observed_at": "2026-09-12T00:00:00Z",
|
|
15
|
+
"account": {
|
|
16
|
+
"key": "account-1",
|
|
17
|
+
"provider": "codex",
|
|
18
|
+
"scope_source": "operator",
|
|
19
|
+
"label": "Work"
|
|
20
|
+
},
|
|
21
|
+
"source": "codex_app_server",
|
|
22
|
+
"limits": [
|
|
23
|
+
{
|
|
24
|
+
"id": "weekly",
|
|
25
|
+
"label": "Weekly",
|
|
26
|
+
"kind": "quota",
|
|
27
|
+
"used_percent": 95,
|
|
28
|
+
"resets_at": "2026-09-19T00:00:00Z"
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
],
|
|
34
|
+
"api_key": "not-permitted"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
@@ -11,14 +11,12 @@
|
|
|
11
11
|
"session_id": "session-1",
|
|
12
12
|
"turn_id": "turn-1",
|
|
13
13
|
"workspace_id": "workspace-1",
|
|
14
|
-
"provider_instance_id": "provider-1"
|
|
15
|
-
"run_id": "run-1"
|
|
14
|
+
"provider_instance_id": "provider-1"
|
|
16
15
|
},
|
|
17
16
|
"lease": {
|
|
18
17
|
"lease_id": "local-lease-read",
|
|
19
18
|
"capability_id": "git",
|
|
20
19
|
"scope": "workspace_read",
|
|
21
|
-
"run_id": "run-1",
|
|
22
20
|
"hcp_session_id": "session-1",
|
|
23
21
|
"execution_host_id": "host-1",
|
|
24
22
|
"provider_instance_id": "provider-1",
|
|
@@ -11,14 +11,12 @@
|
|
|
11
11
|
"session_id": "session-1",
|
|
12
12
|
"turn_id": "turn-1",
|
|
13
13
|
"workspace_id": "workspace-1",
|
|
14
|
-
"provider_instance_id": "provider-1"
|
|
15
|
-
"run_id": "run-1"
|
|
14
|
+
"provider_instance_id": "provider-1"
|
|
16
15
|
},
|
|
17
16
|
"lease": {
|
|
18
17
|
"lease_id": "local-lease-patch",
|
|
19
18
|
"capability_id": "filesystem",
|
|
20
19
|
"scope": "workspace_write",
|
|
21
|
-
"run_id": "run-1",
|
|
22
20
|
"hcp_session_id": "session-1",
|
|
23
21
|
"execution_host_id": "host-1",
|
|
24
22
|
"provider_instance_id": "provider-1",
|
|
@@ -11,14 +11,12 @@
|
|
|
11
11
|
"session_id": "session-1",
|
|
12
12
|
"turn_id": "turn-1",
|
|
13
13
|
"workspace_id": "workspace-1",
|
|
14
|
-
"provider_instance_id": "provider-1"
|
|
15
|
-
"run_id": "run-1"
|
|
14
|
+
"provider_instance_id": "provider-1"
|
|
16
15
|
},
|
|
17
16
|
"lease": {
|
|
18
17
|
"lease_id": "local-lease-shell",
|
|
19
18
|
"capability_id": "shell",
|
|
20
19
|
"scope": "workspace",
|
|
21
|
-
"run_id": "run-1",
|
|
22
20
|
"hcp_session_id": "session-1",
|
|
23
21
|
"execution_host_id": "host-1",
|
|
24
22
|
"provider_instance_id": "provider-1",
|
|
@@ -48,7 +46,9 @@
|
|
|
48
46
|
},
|
|
49
47
|
"input": {
|
|
50
48
|
"executable": "npm",
|
|
51
|
-
"argv": [
|
|
49
|
+
"argv": [
|
|
50
|
+
"test"
|
|
51
|
+
],
|
|
52
52
|
"cwd": "/tmp/workspace",
|
|
53
53
|
"use_shell": false
|
|
54
54
|
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "account-fixture",
|
|
3
|
+
"version": "hcp.v0",
|
|
4
|
+
"sent_at": "2026-09-12T00:00:00Z",
|
|
5
|
+
"type": "host.accounts.snapshot",
|
|
6
|
+
"payload": {
|
|
7
|
+
"request_id": "read-1",
|
|
8
|
+
"host_id": "host-1",
|
|
9
|
+
"providers": [
|
|
10
|
+
{
|
|
11
|
+
"provider_instance_id": "codex",
|
|
12
|
+
"observation": {
|
|
13
|
+
"status": "available",
|
|
14
|
+
"observed_at": "2026-09-12T00:00:00Z",
|
|
15
|
+
"account": {
|
|
16
|
+
"key": "account-1",
|
|
17
|
+
"provider": "codex",
|
|
18
|
+
"scope_source": "operator",
|
|
19
|
+
"label": "Work"
|
|
20
|
+
},
|
|
21
|
+
"source": "codex_app_server",
|
|
22
|
+
"limits": [
|
|
23
|
+
{
|
|
24
|
+
"id": "weekly",
|
|
25
|
+
"label": "Weekly",
|
|
26
|
+
"kind": "quota",
|
|
27
|
+
"used_percent": 95,
|
|
28
|
+
"resets_at": "2026-09-19T00:00:00Z"
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
]
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "account-fixture",
|
|
3
|
+
"version": "hcp.v0",
|
|
4
|
+
"sent_at": "2026-09-12T00:00:00Z",
|
|
5
|
+
"type": "host.accounts.snapshot",
|
|
6
|
+
"payload": {
|
|
7
|
+
"request_id": "read-1",
|
|
8
|
+
"host_id": "host-1",
|
|
9
|
+
"providers": [
|
|
10
|
+
{
|
|
11
|
+
"provider_instance_id": "claude",
|
|
12
|
+
"observation": {
|
|
13
|
+
"status": "unavailable",
|
|
14
|
+
"observed_at": "2026-09-12T00:00:00Z",
|
|
15
|
+
"reason": "unsupported",
|
|
16
|
+
"message": "Opt-in required."
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -11,14 +11,12 @@
|
|
|
11
11
|
"session_id": "session-1",
|
|
12
12
|
"turn_id": "turn-1",
|
|
13
13
|
"workspace_id": "workspace-1",
|
|
14
|
-
"provider_instance_id": "provider-1"
|
|
15
|
-
"run_id": "run-1"
|
|
14
|
+
"provider_instance_id": "provider-1"
|
|
16
15
|
},
|
|
17
16
|
"lease": {
|
|
18
17
|
"lease_id": "local-lease-dev-server",
|
|
19
18
|
"capability_id": "dev_server",
|
|
20
19
|
"scope": "workspace",
|
|
21
|
-
"run_id": "run-1",
|
|
22
20
|
"hcp_session_id": "session-1",
|
|
23
21
|
"execution_host_id": "host-1",
|
|
24
22
|
"provider_instance_id": "provider-1",
|
|
@@ -53,7 +51,10 @@
|
|
|
53
51
|
"input": {
|
|
54
52
|
"server_id": "web",
|
|
55
53
|
"executable": "npm",
|
|
56
|
-
"argv": [
|
|
54
|
+
"argv": [
|
|
55
|
+
"run",
|
|
56
|
+
"dev"
|
|
57
|
+
],
|
|
57
58
|
"cwd": "/tmp/workspace",
|
|
58
59
|
"host": "127.0.0.1",
|
|
59
60
|
"port": 3000,
|
|
@@ -11,14 +11,12 @@
|
|
|
11
11
|
"session_id": "session-1",
|
|
12
12
|
"turn_id": "turn-1",
|
|
13
13
|
"workspace_id": "workspace-1",
|
|
14
|
-
"provider_instance_id": "provider-1"
|
|
15
|
-
"run_id": "run-1"
|
|
14
|
+
"provider_instance_id": "provider-1"
|
|
16
15
|
},
|
|
17
16
|
"lease": {
|
|
18
17
|
"lease_id": "local-lease-dev-server",
|
|
19
18
|
"capability_id": "dev_server",
|
|
20
19
|
"scope": "workspace",
|
|
21
|
-
"run_id": "run-1",
|
|
22
20
|
"hcp_session_id": "session-1",
|
|
23
21
|
"execution_host_id": "host-1",
|
|
24
22
|
"provider_instance_id": "provider-1",
|
|
@@ -12,14 +12,12 @@
|
|
|
12
12
|
"session_id": "session-1",
|
|
13
13
|
"turn_id": "turn-1",
|
|
14
14
|
"workspace_id": "workspace-1",
|
|
15
|
-
"provider_instance_id": "provider-1"
|
|
16
|
-
"run_id": "run-1"
|
|
15
|
+
"provider_instance_id": "provider-1"
|
|
17
16
|
},
|
|
18
17
|
"lease": {
|
|
19
18
|
"lease_id": "local-lease-patch",
|
|
20
19
|
"capability_id": "filesystem",
|
|
21
20
|
"scope": "workspace_write",
|
|
22
|
-
"run_id": "run-1",
|
|
23
21
|
"hcp_session_id": "session-1",
|
|
24
22
|
"execution_host_id": "host-1",
|
|
25
23
|
"provider_instance_id": "provider-1",
|
|
@@ -11,14 +11,12 @@
|
|
|
11
11
|
"session_id": "session-1",
|
|
12
12
|
"turn_id": "turn-1",
|
|
13
13
|
"workspace_id": "workspace-1",
|
|
14
|
-
"provider_instance_id": "provider-1"
|
|
15
|
-
"run_id": "run-1"
|
|
14
|
+
"provider_instance_id": "provider-1"
|
|
16
15
|
},
|
|
17
16
|
"lease": {
|
|
18
17
|
"lease_id": "local-lease-list",
|
|
19
18
|
"capability_id": "filesystem",
|
|
20
19
|
"scope": "workspace_read",
|
|
21
|
-
"run_id": "run-1",
|
|
22
20
|
"hcp_session_id": "session-1",
|
|
23
21
|
"execution_host_id": "host-1",
|
|
24
22
|
"provider_instance_id": "provider-1",
|
|
@@ -11,14 +11,12 @@
|
|
|
11
11
|
"session_id": "session-1",
|
|
12
12
|
"turn_id": "turn-1",
|
|
13
13
|
"workspace_id": "workspace-1",
|
|
14
|
-
"provider_instance_id": "provider-1"
|
|
15
|
-
"run_id": "run-1"
|
|
14
|
+
"provider_instance_id": "provider-1"
|
|
16
15
|
},
|
|
17
16
|
"lease": {
|
|
18
17
|
"lease_id": "local-lease-patch",
|
|
19
18
|
"capability_id": "filesystem",
|
|
20
19
|
"scope": "workspace_write",
|
|
21
|
-
"run_id": "run-1",
|
|
22
20
|
"hcp_session_id": "session-1",
|
|
23
21
|
"execution_host_id": "host-1",
|
|
24
22
|
"provider_instance_id": "provider-1",
|
|
@@ -11,14 +11,12 @@
|
|
|
11
11
|
"session_id": "session-1",
|
|
12
12
|
"turn_id": "turn-1",
|
|
13
13
|
"workspace_id": "workspace-1",
|
|
14
|
-
"provider_instance_id": "provider-1"
|
|
15
|
-
"run_id": "run-1"
|
|
14
|
+
"provider_instance_id": "provider-1"
|
|
16
15
|
},
|
|
17
16
|
"lease": {
|
|
18
17
|
"lease_id": "local-lease-read",
|
|
19
18
|
"capability_id": "filesystem",
|
|
20
19
|
"scope": "workspace_read",
|
|
21
|
-
"run_id": "run-1",
|
|
22
20
|
"hcp_session_id": "session-1",
|
|
23
21
|
"execution_host_id": "host-1",
|
|
24
22
|
"provider_instance_id": "provider-1",
|
|
@@ -11,14 +11,12 @@
|
|
|
11
11
|
"session_id": "session-1",
|
|
12
12
|
"turn_id": "turn-1",
|
|
13
13
|
"workspace_id": "workspace-1",
|
|
14
|
-
"provider_instance_id": "provider-1"
|
|
15
|
-
"run_id": "run-1"
|
|
14
|
+
"provider_instance_id": "provider-1"
|
|
16
15
|
},
|
|
17
16
|
"lease": {
|
|
18
17
|
"lease_id": "local-lease-write",
|
|
19
18
|
"capability_id": "filesystem",
|
|
20
19
|
"scope": "workspace_write",
|
|
21
|
-
"run_id": "run-1",
|
|
22
20
|
"hcp_session_id": "session-1",
|
|
23
21
|
"execution_host_id": "host-1",
|
|
24
22
|
"provider_instance_id": "provider-1",
|
|
@@ -11,14 +11,12 @@
|
|
|
11
11
|
"session_id": "session-1",
|
|
12
12
|
"turn_id": "turn-1",
|
|
13
13
|
"workspace_id": "workspace-1",
|
|
14
|
-
"provider_instance_id": "provider-1"
|
|
15
|
-
"run_id": "run-1"
|
|
14
|
+
"provider_instance_id": "provider-1"
|
|
16
15
|
},
|
|
17
16
|
"lease": {
|
|
18
17
|
"lease_id": "local-lease-git-diff",
|
|
19
18
|
"capability_id": "git",
|
|
20
19
|
"scope": "workspace_read",
|
|
21
|
-
"run_id": "run-1",
|
|
22
20
|
"hcp_session_id": "session-1",
|
|
23
21
|
"execution_host_id": "host-1",
|
|
24
22
|
"provider_instance_id": "provider-1",
|
|
@@ -46,7 +44,9 @@
|
|
|
46
44
|
"failed_event_type": "local_capability.action.failed"
|
|
47
45
|
},
|
|
48
46
|
"input": {
|
|
49
|
-
"paths": [
|
|
47
|
+
"paths": [
|
|
48
|
+
"README.md"
|
|
49
|
+
],
|
|
50
50
|
"staged": false
|
|
51
51
|
}
|
|
52
52
|
}
|
|
@@ -11,14 +11,12 @@
|
|
|
11
11
|
"session_id": "session-1",
|
|
12
12
|
"turn_id": "turn-1",
|
|
13
13
|
"workspace_id": "workspace-1",
|
|
14
|
-
"provider_instance_id": "provider-1"
|
|
15
|
-
"run_id": "run-1"
|
|
14
|
+
"provider_instance_id": "provider-1"
|
|
16
15
|
},
|
|
17
16
|
"lease": {
|
|
18
17
|
"lease_id": "local-lease-git-status",
|
|
19
18
|
"capability_id": "git",
|
|
20
19
|
"scope": "workspace_read",
|
|
21
|
-
"run_id": "run-1",
|
|
22
20
|
"hcp_session_id": "session-1",
|
|
23
21
|
"execution_host_id": "host-1",
|
|
24
22
|
"provider_instance_id": "provider-1",
|
|
@@ -12,14 +12,12 @@
|
|
|
12
12
|
"session_id": "session-1",
|
|
13
13
|
"turn_id": "turn-1",
|
|
14
14
|
"workspace_id": "workspace-1",
|
|
15
|
-
"provider_instance_id": "provider-1"
|
|
16
|
-
"run_id": "run-1"
|
|
15
|
+
"provider_instance_id": "provider-1"
|
|
17
16
|
},
|
|
18
17
|
"lease": {
|
|
19
18
|
"lease_id": "local-lease-shell",
|
|
20
19
|
"capability_id": "shell",
|
|
21
20
|
"scope": "workspace",
|
|
22
|
-
"run_id": "run-1",
|
|
23
21
|
"hcp_session_id": "session-1",
|
|
24
22
|
"execution_host_id": "host-1",
|
|
25
23
|
"provider_instance_id": "provider-1",
|
|
@@ -27,7 +25,9 @@
|
|
|
27
25
|
},
|
|
28
26
|
"output": {
|
|
29
27
|
"executable": "npm",
|
|
30
|
-
"argv": [
|
|
28
|
+
"argv": [
|
|
29
|
+
"test"
|
|
30
|
+
],
|
|
31
31
|
"cwd": "/tmp/workspace",
|
|
32
32
|
"exit_code": 0,
|
|
33
33
|
"signal": null,
|
|
@@ -11,14 +11,12 @@
|
|
|
11
11
|
"session_id": "session-1",
|
|
12
12
|
"turn_id": "turn-1",
|
|
13
13
|
"workspace_id": "workspace-1",
|
|
14
|
-
"provider_instance_id": "provider-1"
|
|
15
|
-
"run_id": "run-1"
|
|
14
|
+
"provider_instance_id": "provider-1"
|
|
16
15
|
},
|
|
17
16
|
"lease": {
|
|
18
17
|
"lease_id": "local-lease-shell",
|
|
19
18
|
"capability_id": "shell",
|
|
20
19
|
"scope": "workspace",
|
|
21
|
-
"run_id": "run-1",
|
|
22
20
|
"hcp_session_id": "session-1",
|
|
23
21
|
"execution_host_id": "host-1",
|
|
24
22
|
"provider_instance_id": "provider-1",
|
|
@@ -55,7 +53,9 @@
|
|
|
55
53
|
},
|
|
56
54
|
"input": {
|
|
57
55
|
"executable": "npm",
|
|
58
|
-
"argv": [
|
|
56
|
+
"argv": [
|
|
57
|
+
"test"
|
|
58
|
+
],
|
|
59
59
|
"cwd": "/tmp/workspace",
|
|
60
60
|
"use_shell": false
|
|
61
61
|
}
|
|
@@ -22,11 +22,7 @@
|
|
|
22
22
|
},
|
|
23
23
|
"local_capability_lease": {
|
|
24
24
|
"lease_id": "local-lease-1",
|
|
25
|
-
"org_id": "org-1",
|
|
26
25
|
"actor_id": "user-1",
|
|
27
|
-
"workflow_id": "workflow-1",
|
|
28
|
-
"run_id": "run-1",
|
|
29
|
-
"node_id": "node-harness",
|
|
30
26
|
"hcp_session_id": "session-1",
|
|
31
27
|
"execution_host_id": "host-local",
|
|
32
28
|
"provider_instance_id": "provider-1",
|
|
@@ -37,15 +33,24 @@
|
|
|
37
33
|
"capabilities": [
|
|
38
34
|
{
|
|
39
35
|
"id": "filesystem",
|
|
40
|
-
"scopes": [
|
|
36
|
+
"scopes": [
|
|
37
|
+
"workspace_read",
|
|
38
|
+
"workspace_write"
|
|
39
|
+
]
|
|
41
40
|
},
|
|
42
41
|
{
|
|
43
42
|
"id": "shell",
|
|
44
|
-
"scopes": [
|
|
43
|
+
"scopes": [
|
|
44
|
+
"workspace"
|
|
45
|
+
],
|
|
45
46
|
"approval_policy": "ask",
|
|
46
47
|
"command_policy": {
|
|
47
|
-
"allowed_executables": [
|
|
48
|
-
|
|
48
|
+
"allowed_executables": [
|
|
49
|
+
"npm"
|
|
50
|
+
],
|
|
51
|
+
"denied_executables": [
|
|
52
|
+
"rm"
|
|
53
|
+
],
|
|
49
54
|
"cwd_policy": "selected_workspace_only",
|
|
50
55
|
"env_policy": "minimal",
|
|
51
56
|
"allow_shell": false,
|