@markjaquith/agency 2.27.0 → 2.28.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 +42 -24
- package/cli.ts +20 -0
- package/fixtures/protocol/orchestration-recipes.json +59 -0
- package/package.json +1 -1
- package/skills/agency/SKILL.md +112 -331
- package/skills/agency/references/commands.md +161 -0
- package/skills/agency/references/contracts.md +288 -0
- package/skills/agency/references/recipes.md +219 -0
- package/src/cli-parser.test.ts +8 -0
- package/src/cli-parser.ts +10 -0
- package/src/cli.test.ts +37 -4
- package/src/commands/doctor.test.ts +156 -0
- package/src/commands/doctor.ts +47 -0
- package/src/commands/init.test.ts +8 -4
- package/src/commands/init.ts +3 -0
- package/src/commands/read-only.test.ts +2 -0
- package/src/commands/work.test.ts +20 -0
- package/src/commands/work.ts +3 -0
- package/src/services/DoctorService.ts +419 -0
- package/src/services/IntegrationService.test.ts +80 -3
- package/src/services/IntegrationService.ts +2 -2
- package/src/test-utils.ts +2 -0
- package/src/workbase/AGENTS.md +53 -19
- package/src/workbase/opencode-file.ts +7 -8
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { createHash } from "node:crypto"
|
|
2
|
-
import { join } from "node:path"
|
|
3
2
|
|
|
4
3
|
const managedHeaderPattern =
|
|
5
4
|
/^\/\/ agency-managed: sha256=([a-f0-9]{64})\r?\n\r?\n/
|
|
@@ -7,24 +6,25 @@ const managedHeaderPattern =
|
|
|
7
6
|
const checksum = (content: string) =>
|
|
8
7
|
createHash("sha256").update(content).digest("hex")
|
|
9
8
|
|
|
10
|
-
const body = (
|
|
9
|
+
const body = () =>
|
|
11
10
|
`${JSON.stringify(
|
|
12
11
|
{
|
|
13
12
|
$schema: "https://opencode.ai/config.json",
|
|
14
13
|
references: {
|
|
15
14
|
tasks: {
|
|
16
15
|
path: "../tasks",
|
|
17
|
-
description:
|
|
16
|
+
description:
|
|
17
|
+
"Agency task definitions and execution context; authority still comes from agency context",
|
|
18
18
|
},
|
|
19
19
|
epics: {
|
|
20
20
|
path: "../epics",
|
|
21
|
-
description:
|
|
21
|
+
description:
|
|
22
|
+
"Agency epic definitions and orchestration context; no implementation write authority",
|
|
22
23
|
},
|
|
23
24
|
},
|
|
24
25
|
permission: {
|
|
25
26
|
external_directory: {
|
|
26
|
-
|
|
27
|
-
[`${join(root, "epics")}/*`]: "allow",
|
|
27
|
+
"../**": "allow",
|
|
28
28
|
},
|
|
29
29
|
},
|
|
30
30
|
},
|
|
@@ -35,8 +35,7 @@ const body = (root: string) =>
|
|
|
35
35
|
const renderManagedWorkbaseOpencode = (content: string) =>
|
|
36
36
|
`// agency-managed: sha256=${checksum(content)}\n\n${content}`
|
|
37
37
|
|
|
38
|
-
export const managedWorkbaseOpencode = (
|
|
39
|
-
renderManagedWorkbaseOpencode(body(root))
|
|
38
|
+
export const managedWorkbaseOpencode = renderManagedWorkbaseOpencode(body())
|
|
40
39
|
|
|
41
40
|
export const canUpdateManagedWorkbaseOpencode = (content: string) => {
|
|
42
41
|
const match = content.match(managedHeaderPattern)
|