@codio-ai/opencode-authoring-agent 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.
Files changed (88) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +119 -0
  3. package/bin/codio-authoring-register.js +77 -0
  4. package/bin/codio-authoring-unregister.js +45 -0
  5. package/dist/agents/assessment-author.d.ts +3 -0
  6. package/dist/agents/assessment-author.d.ts.map +1 -0
  7. package/dist/agents/assessment-author.test.d.ts +2 -0
  8. package/dist/agents/assessment-author.test.d.ts.map +1 -0
  9. package/dist/agents/index.d.ts +6 -0
  10. package/dist/agents/index.d.ts.map +1 -0
  11. package/dist/agents/index.test.d.ts +2 -0
  12. package/dist/agents/index.test.d.ts.map +1 -0
  13. package/dist/agents/orchestrator.d.ts +4 -0
  14. package/dist/agents/orchestrator.d.ts.map +1 -0
  15. package/dist/agents/orchestrator.test.d.ts +2 -0
  16. package/dist/agents/orchestrator.test.d.ts.map +1 -0
  17. package/dist/agents/outline-architect.d.ts +3 -0
  18. package/dist/agents/outline-architect.d.ts.map +1 -0
  19. package/dist/agents/outline-architect.test.d.ts +2 -0
  20. package/dist/agents/outline-architect.test.d.ts.map +1 -0
  21. package/dist/agents/page-author.d.ts +3 -0
  22. package/dist/agents/page-author.d.ts.map +1 -0
  23. package/dist/agents/page-author.test.d.ts +2 -0
  24. package/dist/agents/page-author.test.d.ts.map +1 -0
  25. package/dist/agents/source-ingester.d.ts +3 -0
  26. package/dist/agents/source-ingester.d.ts.map +1 -0
  27. package/dist/agents/source-ingester.test.d.ts +2 -0
  28. package/dist/agents/source-ingester.test.d.ts.map +1 -0
  29. package/dist/agents/types.d.ts +39 -0
  30. package/dist/agents/types.d.ts.map +1 -0
  31. package/dist/agents/types.test.d.ts +2 -0
  32. package/dist/agents/types.test.d.ts.map +1 -0
  33. package/dist/agents/validator.d.ts +3 -0
  34. package/dist/agents/validator.d.ts.map +1 -0
  35. package/dist/agents/validator.test.d.ts +2 -0
  36. package/dist/agents/validator.test.d.ts.map +1 -0
  37. package/dist/config/bedrock-models.d.ts +11 -0
  38. package/dist/config/bedrock-models.d.ts.map +1 -0
  39. package/dist/config/index.d.ts +26 -0
  40. package/dist/config/index.d.ts.map +1 -0
  41. package/dist/config/index.test.d.ts +2 -0
  42. package/dist/config/index.test.d.ts.map +1 -0
  43. package/dist/index.d.ts +5 -0
  44. package/dist/index.d.ts.map +1 -0
  45. package/dist/index.js +1398 -0
  46. package/dist/index.test.d.ts +2 -0
  47. package/dist/index.test.d.ts.map +1 -0
  48. package/dist/tools/create-assessment.d.ts +310 -0
  49. package/dist/tools/create-assessment.d.ts.map +1 -0
  50. package/dist/tools/create-assessment.test.d.ts +2 -0
  51. package/dist/tools/create-assessment.test.d.ts.map +1 -0
  52. package/dist/tools/create-page.d.ts +49 -0
  53. package/dist/tools/create-page.d.ts.map +1 -0
  54. package/dist/tools/create-page.test.d.ts +2 -0
  55. package/dist/tools/create-page.test.d.ts.map +1 -0
  56. package/dist/tools/index.d.ts +62 -0
  57. package/dist/tools/index.d.ts.map +1 -0
  58. package/dist/tools/index.test.d.ts +2 -0
  59. package/dist/tools/index.test.d.ts.map +1 -0
  60. package/dist/tools/validate-guide.d.ts +17 -0
  61. package/dist/tools/validate-guide.d.ts.map +1 -0
  62. package/dist/tools/validate-guide.test.d.ts +2 -0
  63. package/dist/tools/validate-guide.test.d.ts.map +1 -0
  64. package/dist/utils/codio-paths.d.ts +13 -0
  65. package/dist/utils/codio-paths.d.ts.map +1 -0
  66. package/dist/utils/codio-paths.test.d.ts +2 -0
  67. package/dist/utils/codio-paths.test.d.ts.map +1 -0
  68. package/dist/utils/taskid.d.ts +7 -0
  69. package/dist/utils/taskid.d.ts.map +1 -0
  70. package/dist/utils/taskid.test.d.ts +2 -0
  71. package/dist/utils/taskid.test.d.ts.map +1 -0
  72. package/dist/utils/uuid.d.ts +3 -0
  73. package/dist/utils/uuid.d.ts.map +1 -0
  74. package/dist/utils/uuid.test.d.ts +2 -0
  75. package/dist/utils/uuid.test.d.ts.map +1 -0
  76. package/package.json +70 -0
  77. package/src/skills/reference-assessment-types/SKILL.md +309 -0
  78. package/src/skills/reference-authoring-notes/SKILL.md +297 -0
  79. package/src/skills/reference-mcq-quality/SKILL.md +56 -0
  80. package/src/skills/reference-page-flow/SKILL.md +62 -0
  81. package/src/skills/reference-project-defaults/SKILL.md +80 -0
  82. package/src/skills/reference-style/SKILL.md +14 -0
  83. package/src/skills/workflow-add-assessment/SKILL.md +29 -0
  84. package/src/skills/workflow-add-page/SKILL.md +32 -0
  85. package/src/skills/workflow-import-source/SKILL.md +31 -0
  86. package/src/skills/workflow-new-assignment/SKILL.md +69 -0
  87. package/src/skills/workflow-reorder/SKILL.md +24 -0
  88. package/src/skills/workflow-revise-page/SKILL.md +30 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Mohit Chandarana
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,119 @@
1
+ # @codio-ai/opencode-authoring-agent
2
+
3
+ An [opencode](https://opencode.ai) plugin for authoring Codio guide assignments. Provides a `codio-orchestrator` primary agent, five subagents (outline-architect, page-author, assessment-author, source-ingester, validator), three tools (`create_page`, `create_assessment`, `validate_guide`), and twelve skills (six workflows + six reference skills).
4
+
5
+ ## Install (per Codio workspace)
6
+
7
+ Published on npm as [`@codio-ai/opencode-authoring-agent`](https://www.npmjs.com/package/@codio-ai/opencode-authoring-agent). Add to your workspace's `startup.sh`:
8
+
9
+ ```bash
10
+ # Install opencode if missing
11
+ command -v opencode >/dev/null || curl -fsSL https://opencode.ai/install | bash
12
+
13
+ # Install node/npm via nvm if missing
14
+ [ -s "$HOME/.nvm/nvm.sh" ] && \. "$HOME/.nvm/nvm.sh"
15
+ if ! command -v npm >/dev/null; then
16
+ curl -fsSL https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
17
+ export NVM_DIR="$HOME/.nvm"
18
+ \. "$NVM_DIR/nvm.sh"
19
+ nvm install --lts
20
+ fi
21
+
22
+ # Install plugin — postinstall registers it with opencode automatically
23
+ npm install -g @codio-ai/opencode-authoring-agent@latest
24
+ ```
25
+
26
+ See [`startup.sh.example`](startup.sh.example) for the full version with error handling.
27
+
28
+ To pin a version: `npm install -g @codio-ai/opencode-authoring-agent@1.2.3`.
29
+
30
+ ## What gets installed where
31
+
32
+ After `npm install -g`, the package's postinstall script writes:
33
+
34
+ - `~/.config/opencode/plugins/codio-authoring.js` — a tiny wrapper that re-exports the plugin from its installed location (so node_modules resolve correctly)
35
+ - `~/.config/opencode/skills/<name>/SKILL.md` — all 12 skills (6 workflow + 6 reference), copied from the package
36
+
37
+ To remove cleanly: `npm uninstall -g @codio-ai/opencode-authoring-agent` — the package's preuninstall script removes the wrapper and skills.
38
+
39
+ To re-run registration manually (e.g. after editing skills locally during development): `codio-authoring-register`.
40
+
41
+ ## AWS Bedrock setup
42
+
43
+ The plugin auto-registers two AWS Bedrock model definitions in opencode's provider config:
44
+
45
+ | Plugin key | AWS Bedrock inference profile ID |
46
+ |---|---|
47
+ | `amazon-bedrock/sonnet-4-6` | `us.anthropic.claude-sonnet-4-6` |
48
+ | `amazon-bedrock/haiku-4-5` | `us.anthropic.claude-haiku-4-5-20251001-v1:0` |
49
+
50
+ Override either by adding to your `opencode.json` (project-local) or `~/.config/opencode/config.json`:
51
+
52
+ ```jsonc
53
+ {
54
+ "provider": {
55
+ "amazon-bedrock": {
56
+ "models": {
57
+ "sonnet-4-6": {
58
+ "id": "arn:aws:bedrock:us-east-1:xxx:application-inference-profile/yyy"
59
+ }
60
+ }
61
+ }
62
+ }
63
+ }
64
+ ```
65
+
66
+ Auth: set one of —
67
+
68
+ - `AWS_BEARER_TOKEN_BEDROCK` (Bedrock-specific bearer token, simplest)
69
+ - `AWS_PROFILE` (with `AWS_REGION`) — uses standard AWS CLI profile
70
+ - `AWS_ACCESS_KEY_ID` + `AWS_SECRET_ACCESS_KEY` + `AWS_REGION`
71
+
72
+ The plugin does not manage credentials; it relies on opencode's underlying AWS SDK to pick them up from the environment.
73
+
74
+ ## Configuration
75
+
76
+ Plugin config (optional) lives at `<workspace>/codio-authoring.json`. All fields optional:
77
+
78
+ ```jsonc
79
+ {
80
+ "defaultModels": {
81
+ "primary": "amazon-bedrock/sonnet-4-6",
82
+ "cheap": "amazon-bedrock/haiku-4-5"
83
+ },
84
+ "disabledAgents": [],
85
+ "agents": {
86
+ "codio-orchestrator": {
87
+ // To use a custom model key, first add it to the bedrock models block in
88
+ // opencode.json: provider.amazon-bedrock.models.opus-4-7.id = <profile-id>
89
+ "model": "amazon-bedrock/opus-4-7",
90
+ "temperature": 0.1
91
+ }
92
+ }
93
+ }
94
+ ```
95
+
96
+ ## Usage
97
+
98
+ Once installed, run `opencode` from the workspace root. The orchestrator handles natural-language intents directly — no slash commands needed for authoring. Examples:
99
+
100
+ - "Start a new assignment on iterators in Python for first-year CS students."
101
+ - "Add a page on list comprehensions to the existing chapter."
102
+ - "Add 3 MCQs on for-loops to the iterators page."
103
+ - "Reorder: move the assessment page to the end."
104
+
105
+ The only slash command is `/validate-guide`, which runs the structural validator on demand.
106
+
107
+ ## Development
108
+
109
+ ```bash
110
+ bun install
111
+ bun test
112
+ bun run typecheck
113
+ bun run check
114
+ bun run build
115
+ ```
116
+
117
+ ## Architecture
118
+
119
+ See `docs/superpowers/specs/2026-05-11-codio-authoring-opencode-plugin-design.md` (in the parent monorepo) for the full design.
@@ -0,0 +1,77 @@
1
+ #!/usr/bin/env node
2
+ import { fileURLToPath } from 'node:url';
3
+ import { dirname, join, resolve } from 'node:path';
4
+ import {
5
+ existsSync,
6
+ mkdirSync,
7
+ rmSync,
8
+ cpSync,
9
+ writeFileSync,
10
+ readdirSync,
11
+ statSync,
12
+ } from 'node:fs';
13
+
14
+ const __filename = fileURLToPath(import.meta.url);
15
+ const __dirname = dirname(__filename);
16
+ const pkgRoot = resolve(__dirname, '..');
17
+
18
+ function main() {
19
+ const distEntry = join(pkgRoot, 'dist', 'index.js');
20
+ if (!existsSync(distEntry)) {
21
+ console.warn(
22
+ '[codio-authoring-register] dist/index.js not found at ' + distEntry +
23
+ ' — skipping registration. Run `bun run build` (or reinstall) and try again.',
24
+ );
25
+ return;
26
+ }
27
+
28
+ const home = process.env.HOME;
29
+ if (!home) {
30
+ console.warn(
31
+ '[codio-authoring-register] HOME is not set — skipping registration. ' +
32
+ 'Run `codio-authoring-register` manually with HOME exported.',
33
+ );
34
+ return;
35
+ }
36
+
37
+ // 1. Plugin wrapper
38
+ const pluginsDir = join(home, '.config', 'opencode', 'plugins');
39
+ mkdirSync(pluginsDir, { recursive: true });
40
+ const wrapperPath = join(pluginsDir, 'codio-authoring.js');
41
+ writeFileSync(
42
+ wrapperPath,
43
+ `// Auto-registered by codio-authoring-opencode postinstall — do not edit.\n` +
44
+ `// Re-exports the installed plugin from its package location so node_modules resolve.\n` +
45
+ `export { default } from '${distEntry}';\n`,
46
+ );
47
+ console.log(`[codio-authoring-register] plugin wrapper: ${wrapperPath}`);
48
+
49
+ // 2. Skills
50
+ const skillsSrc = join(pkgRoot, 'src', 'skills');
51
+ const skillsDst = join(home, '.config', 'opencode', 'skills');
52
+ if (!existsSync(skillsSrc)) {
53
+ console.warn(`[codio-authoring-register] no skills directory at ${skillsSrc} — skipping skill copy.`);
54
+ return;
55
+ }
56
+ mkdirSync(skillsDst, { recursive: true });
57
+ let count = 0;
58
+ for (const name of readdirSync(skillsSrc)) {
59
+ const src = join(skillsSrc, name);
60
+ if (!statSync(src).isDirectory()) continue;
61
+ const dst = join(skillsDst, name);
62
+ rmSync(dst, { recursive: true, force: true });
63
+ cpSync(src, dst, { recursive: true });
64
+ count++;
65
+ }
66
+ console.log(`[codio-authoring-register] registered ${count} skills under ${skillsDst}`);
67
+ }
68
+
69
+ try {
70
+ main();
71
+ } catch (err) {
72
+ console.warn(
73
+ '[codio-authoring-register] registration failed:',
74
+ err instanceof Error ? err.message : String(err),
75
+ );
76
+ // Exit 0 so npm install doesn't fail.
77
+ }
@@ -0,0 +1,45 @@
1
+ #!/usr/bin/env node
2
+ import { fileURLToPath } from 'node:url';
3
+ import { dirname, join, resolve } from 'node:path';
4
+ import { existsSync, rmSync, readdirSync, statSync } from 'node:fs';
5
+
6
+ const __filename = fileURLToPath(import.meta.url);
7
+ const __dirname = dirname(__filename);
8
+ const pkgRoot = resolve(__dirname, '..');
9
+
10
+ function main() {
11
+ const home = process.env.HOME;
12
+ if (!home) {
13
+ console.warn('[codio-authoring-unregister] HOME is not set — skipping.');
14
+ return;
15
+ }
16
+
17
+ const wrapper = join(home, '.config', 'opencode', 'plugins', 'codio-authoring.js');
18
+ if (existsSync(wrapper)) {
19
+ rmSync(wrapper, { force: true });
20
+ console.log(`[codio-authoring-unregister] removed ${wrapper}`);
21
+ }
22
+
23
+ const skillsSrc = join(pkgRoot, 'src', 'skills');
24
+ const skillsDst = join(home, '.config', 'opencode', 'skills');
25
+ if (existsSync(skillsSrc) && existsSync(skillsDst)) {
26
+ let count = 0;
27
+ for (const name of readdirSync(skillsSrc)) {
28
+ const src = join(skillsSrc, name);
29
+ if (!statSync(src).isDirectory()) continue;
30
+ const dst = join(skillsDst, name);
31
+ if (existsSync(dst)) {
32
+ rmSync(dst, { recursive: true, force: true });
33
+ count++;
34
+ }
35
+ }
36
+ console.log(`[codio-authoring-unregister] removed ${count} skills from ${skillsDst}`);
37
+ }
38
+ }
39
+
40
+ try { main(); } catch (err) {
41
+ console.warn(
42
+ '[codio-authoring-unregister] cleanup failed:',
43
+ err instanceof Error ? err.message : String(err),
44
+ );
45
+ }
@@ -0,0 +1,3 @@
1
+ import type { AgentDefinition } from './types';
2
+ export declare function createAssessmentAuthorAgent(model?: string, customPrompt?: string, customAppendPrompt?: string): AgentDefinition;
3
+ //# sourceMappingURL=assessment-author.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assessment-author.d.ts","sourceRoot":"","sources":["../../src/agents/assessment-author.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAiC/C,wBAAgB,2BAA2B,CACzC,KAAK,CAAC,EAAE,MAAM,EACd,YAAY,CAAC,EAAE,MAAM,EACrB,kBAAkB,CAAC,EAAE,MAAM,GAC1B,eAAe,CAkBjB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=assessment-author.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"assessment-author.test.d.ts","sourceRoot":"","sources":["../../src/agents/assessment-author.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import type { PluginConfig } from '../config';
2
+ import type { AgentDefinition } from './types';
3
+ export declare function getDisabledAgents(config: PluginConfig): Set<string>;
4
+ export declare function createAgents(config: PluginConfig): AgentDefinition[];
5
+ export declare function getAgentConfigs(agents: AgentDefinition[]): Record<string, unknown>;
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agents/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAM9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAiD/C,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,YAAY,GAAG,GAAG,CAAC,MAAM,CAAC,CAEnE;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,YAAY,GAAG,eAAe,EAAE,CAmBpE;AAED,wBAAgB,eAAe,CAC7B,MAAM,EAAE,eAAe,EAAE,GACxB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAIzB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../src/agents/index.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ import type { AgentDefinition } from './types';
2
+ export declare function buildOrchestratorPrompt(disabledAgents?: Set<string>): string;
3
+ export declare function createCodioOrchestratorAgent(model?: string, customPrompt?: string, customAppendPrompt?: string, disabledAgents?: Set<string>): AgentDefinition;
4
+ //# sourceMappingURL=orchestrator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orchestrator.d.ts","sourceRoot":"","sources":["../../src/agents/orchestrator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAkD/C,wBAAgB,uBAAuB,CAAC,cAAc,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,MAAM,CAyF5E;AAED,wBAAgB,4BAA4B,CAC1C,KAAK,CAAC,EAAE,MAAM,EACd,YAAY,CAAC,EAAE,MAAM,EACrB,kBAAkB,CAAC,EAAE,MAAM,EAC3B,cAAc,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,GAC3B,eAAe,CAiBjB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=orchestrator.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orchestrator.test.d.ts","sourceRoot":"","sources":["../../src/agents/orchestrator.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import type { AgentDefinition } from './types';
2
+ export declare function createOutlineArchitectAgent(model?: string, customPrompt?: string, customAppendPrompt?: string): AgentDefinition;
3
+ //# sourceMappingURL=outline-architect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outline-architect.d.ts","sourceRoot":"","sources":["../../src/agents/outline-architect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAyD/C,wBAAgB,2BAA2B,CACzC,KAAK,CAAC,EAAE,MAAM,EACd,YAAY,CAAC,EAAE,MAAM,EACrB,kBAAkB,CAAC,EAAE,MAAM,GAC1B,eAAe,CAkBjB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=outline-architect.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outline-architect.test.d.ts","sourceRoot":"","sources":["../../src/agents/outline-architect.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import type { AgentDefinition } from './types';
2
+ export declare function createPageAuthorAgent(model?: string, customPrompt?: string, customAppendPrompt?: string): AgentDefinition;
3
+ //# sourceMappingURL=page-author.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-author.d.ts","sourceRoot":"","sources":["../../src/agents/page-author.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAsD/C,wBAAgB,qBAAqB,CACnC,KAAK,CAAC,EAAE,MAAM,EACd,YAAY,CAAC,EAAE,MAAM,EACrB,kBAAkB,CAAC,EAAE,MAAM,GAC1B,eAAe,CAkBjB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=page-author.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"page-author.test.d.ts","sourceRoot":"","sources":["../../src/agents/page-author.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import type { AgentDefinition } from './types';
2
+ export declare function createSourceIngesterAgent(model?: string, customPrompt?: string, customAppendPrompt?: string): AgentDefinition;
3
+ //# sourceMappingURL=source-ingester.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source-ingester.d.ts","sourceRoot":"","sources":["../../src/agents/source-ingester.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AA+C/C,wBAAgB,yBAAyB,CACvC,KAAK,CAAC,EAAE,MAAM,EACd,YAAY,CAAC,EAAE,MAAM,EACrB,kBAAkB,CAAC,EAAE,MAAM,GAC1B,eAAe,CAkBjB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=source-ingester.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"source-ingester.test.d.ts","sourceRoot":"","sources":["../../src/agents/source-ingester.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * AgentConfig is defined locally because the @opencode-ai/sdk does not expose it
3
+ * through any of its public entry points (., ./client, ./server, ./v2, ./v2/client,
4
+ * ./v2/gen/client, ./v2/server). The type lives at dist/v2/gen/types.gen.d.ts but
5
+ * is not re-exported. The fields below mirror the upstream definition for the
6
+ * properties this plugin uses; add more as needed.
7
+ */
8
+ export interface AgentConfig {
9
+ mode?: 'subagent' | 'primary' | 'all';
10
+ model?: string;
11
+ prompt?: string;
12
+ temperature?: number;
13
+ /** Tool permission map — key is tool name, value enables/disables it */
14
+ tools?: Record<string, boolean>;
15
+ description?: string;
16
+ options?: Record<string, unknown>;
17
+ permission?: {
18
+ read?: 'allow' | 'deny';
19
+ write?: 'allow' | 'deny';
20
+ edit?: 'allow' | 'deny';
21
+ bash?: 'allow' | 'deny';
22
+ /**
23
+ * Gates the built-in interactive question capability — when 'allow',
24
+ * the agent can render multiple-choice + type-your-own prompts to the
25
+ * user via opencode's question UI. Set this on primary agents so they
26
+ * behave like the built-in `build` agent during clarification.
27
+ */
28
+ question?: 'allow' | 'ask' | 'deny';
29
+ webfetch?: 'allow' | 'deny';
30
+ };
31
+ }
32
+ export interface AgentDefinition {
33
+ name: string;
34
+ displayName?: string;
35
+ description?: string;
36
+ config: AgentConfig;
37
+ }
38
+ export declare function resolvePrompt(base: string, customPrompt?: string, customAppendPrompt?: string): string;
39
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/agents/types.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,WAAW,WAAW;IAC1B,IAAI,CAAC,EAAE,UAAU,GAAG,SAAS,GAAG,KAAK,CAAC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,wEAAwE;IACxE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,UAAU,CAAC,EAAE;QACX,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;QACxB,KAAK,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;QACzB,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;QACxB,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;QACxB;;;;;WAKG;QACH,QAAQ,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,MAAM,CAAC;QACpC,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;KAC7B,CAAC;CACH;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,WAAW,CAAC;CACrB;AAED,wBAAgB,aAAa,CAC3B,IAAI,EAAE,MAAM,EACZ,YAAY,CAAC,EAAE,MAAM,EACrB,kBAAkB,CAAC,EAAE,MAAM,GAC1B,MAAM,CAIR"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.test.d.ts","sourceRoot":"","sources":["../../src/agents/types.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,3 @@
1
+ import type { AgentDefinition } from './types';
2
+ export declare function createValidatorAgent(model?: string, customPrompt?: string, customAppendPrompt?: string): AgentDefinition;
3
+ //# sourceMappingURL=validator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validator.d.ts","sourceRoot":"","sources":["../../src/agents/validator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AA+C/C,wBAAgB,oBAAoB,CAClC,KAAK,CAAC,EAAE,MAAM,EACd,YAAY,CAAC,EAAE,MAAM,EACrB,kBAAkB,CAAC,EAAE,MAAM,GAC1B,eAAe,CAkBjB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=validator.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validator.test.d.ts","sourceRoot":"","sources":["../../src/agents/validator.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,11 @@
1
+ export declare const DEFAULT_BEDROCK_MODELS: {
2
+ readonly 'sonnet-4-6': {
3
+ readonly id: "us.anthropic.claude-sonnet-4-6";
4
+ readonly name: "Claude Sonnet 4.6 (US cross-region)";
5
+ };
6
+ readonly 'haiku-4-5': {
7
+ readonly id: "us.anthropic.claude-haiku-4-5-20251001-v1:0";
8
+ readonly name: "Claude Haiku 4.5 (US cross-region)";
9
+ };
10
+ };
11
+ //# sourceMappingURL=bedrock-models.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bedrock-models.d.ts","sourceRoot":"","sources":["../../src/config/bedrock-models.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,sBAAsB;;;;;;;;;CASzB,CAAC"}
@@ -0,0 +1,26 @@
1
+ import { z } from 'zod';
2
+ export declare const agentOverrideSchema: z.ZodObject<{
3
+ model: z.ZodOptional<z.ZodString>;
4
+ prompt: z.ZodOptional<z.ZodString>;
5
+ appendPrompt: z.ZodOptional<z.ZodString>;
6
+ temperature: z.ZodOptional<z.ZodNumber>;
7
+ skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
8
+ }, z.core.$strip>;
9
+ export declare const pluginConfigSchema: z.ZodDefault<z.ZodObject<{
10
+ agents: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
11
+ model: z.ZodOptional<z.ZodString>;
12
+ prompt: z.ZodOptional<z.ZodString>;
13
+ appendPrompt: z.ZodOptional<z.ZodString>;
14
+ temperature: z.ZodOptional<z.ZodNumber>;
15
+ skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
16
+ }, z.core.$strip>>>;
17
+ disabledAgents: z.ZodDefault<z.ZodArray<z.ZodString>>;
18
+ defaultModels: z.ZodDefault<z.ZodObject<{
19
+ primary: z.ZodDefault<z.ZodString>;
20
+ cheap: z.ZodDefault<z.ZodString>;
21
+ }, z.core.$strip>>;
22
+ }, z.core.$strip>>;
23
+ export type PluginConfig = z.infer<typeof pluginConfigSchema>;
24
+ export type AgentOverride = z.infer<typeof agentOverrideSchema>;
25
+ export declare function loadPluginConfig(directory: string): PluginConfig;
26
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAKxB,eAAO,MAAM,mBAAmB;;;;;;iBAM9B,CAAC;AAEH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;kBAkB1B,CAAC;AAEN,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAC9D,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEhE,wBAAgB,gBAAgB,CAAC,SAAS,EAAE,MAAM,GAAG,YAAY,CAwBhE"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.test.d.ts","sourceRoot":"","sources":["../../src/config/index.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,5 @@
1
+ import type { Plugin } from '@opencode-ai/plugin';
2
+ declare const CodioAuthoringPlugin: Plugin;
3
+ export default CodioAuthoringPlugin;
4
+ export type { AgentOverride, PluginConfig } from './config';
5
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAUlD,QAAA,MAAM,oBAAoB,EA0FT,MAAM,CAAC;AAExB,eAAe,oBAAoB,CAAC;AAEpC,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC"}