@codio-ai/opencode-authoring-agent 0.1.6 → 0.1.8
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/index.js
CHANGED
|
@@ -47182,7 +47182,7 @@ var createPageInputSchema = z3.object({
|
|
|
47182
47182
|
type: z3.enum(PAGE_TYPES),
|
|
47183
47183
|
layout: z3.enum(PAGE_LAYOUTS),
|
|
47184
47184
|
learningObjectives: z3.array(z3.string()).default([]),
|
|
47185
|
-
files: z3.array(z3.string()).optional(),
|
|
47185
|
+
files: z3.preprocess((v) => Array.isArray(v) ? v.map((f) => typeof f === "string" ? f : typeof f === "object" && f !== null && ("path" in f) ? String(f.path) : f) : v, z3.array(z3.string()).optional()),
|
|
47186
47186
|
markdownBody: z3.string(),
|
|
47187
47187
|
chapterFolder: z3.string().regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/, "chapterFolder must be a kebab-case directory name (no slashes, no ..)").optional()
|
|
47188
47188
|
}).refine((v) => v.layout !== "2-panels-tree" || v.files && v.files.length > 0, { message: "layout=2-panels-tree requires files", path: ["files"] });
|
|
@@ -18,7 +18,7 @@ export declare const createPageInputSchema: z.ZodObject<{
|
|
|
18
18
|
"2-panels-tree": "2-panels-tree";
|
|
19
19
|
}>;
|
|
20
20
|
learningObjectives: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
21
|
-
files: z.ZodOptional<z.ZodArray<z.ZodString
|
|
21
|
+
files: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodOptional<z.ZodArray<z.ZodString>>>;
|
|
22
22
|
markdownBody: z.ZodString;
|
|
23
23
|
chapterFolder: z.ZodOptional<z.ZodString>;
|
|
24
24
|
}, z.core.$strip>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-page.d.ts","sourceRoot":"","sources":["../../src/tools/create-page.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAW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IACjB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,wBAAgB,gBAAgB,CAC9B,SAAS,EAAE,MAAM,EACjB,aAAa,EAAE,MAAM,GAAG,SAAS,EACjC,KAAK,EAAE,eAAe,GACrB,gBAAgB,CA6BlB;AAED,wBAAsB,iBAAiB,CACrC,GAAG,EAAE,OAAO,GACX,OAAO,CAAC,gBAAgB,CAAC,CAO3B"}
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -16,7 +16,7 @@ export declare const create_page: {
|
|
|
16
16
|
"2-panels-tree": "2-panels-tree";
|
|
17
17
|
}>;
|
|
18
18
|
learningObjectives: import("zod").ZodDefault<import("zod").ZodArray<import("zod").ZodString>>;
|
|
19
|
-
files: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString
|
|
19
|
+
files: import("zod").ZodPipe<import("zod").ZodTransform<unknown, unknown>, import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString>>>;
|
|
20
20
|
markdownBody: import("zod").ZodString;
|
|
21
21
|
chapterFolder: import("zod").ZodOptional<import("zod").ZodString>;
|
|
22
22
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codio-ai/opencode-authoring-agent",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "Opencode plugin for authoring Codio guide assignments — orchestrator, subagents, tools, and skills.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -28,13 +28,7 @@
|
|
|
28
28
|
"check:ci": "biome check ."
|
|
29
29
|
},
|
|
30
30
|
"keywords": ["opencode", "opencode-plugin", "codio", "assignment-authoring", "education"],
|
|
31
|
-
"license": "
|
|
32
|
-
"repository": {
|
|
33
|
-
"type": "git",
|
|
34
|
-
"url": "https://github.com/codio-extensions/codio-authoring-opencode-plugin.git"
|
|
35
|
-
},
|
|
36
|
-
"homepage": "https://github.com/codio-extensions/codio-authoring-opencode-plugin#readme",
|
|
37
|
-
"bugs": "https://github.com/codio-extensions/codio-authoring-opencode-plugin/issues",
|
|
31
|
+
"license": "UNLICENSED",
|
|
38
32
|
"engines": {
|
|
39
33
|
"node": ">=20"
|
|
40
34
|
},
|
|
@@ -332,7 +332,7 @@ The probe script is intentionally student-visible — students click a button to
|
|
|
332
332
|
```
|
|
333
333
|
functionName string Python function name (snake_case), used as the file stem
|
|
334
334
|
functionSignature string Full def line with type hints, e.g. "def min_index(int_list: list[int]) -> int:"
|
|
335
|
-
problemStatement string Narrative description for the guide page
|
|
335
|
+
problemStatement string Narrative description for the guide page. Must be intentionally vague — omit edge cases and boundary conditions so students must use the probe to discover them.
|
|
336
336
|
inputVariable string Variable students modify to probe, e.g. "int_list"
|
|
337
337
|
inputVariableAnnotation string Python type annotation, e.g. "list[int]"
|
|
338
338
|
defaultInputValue string Default value shown in student file, e.g. "[1, 2, 3]"
|
|
@@ -347,6 +347,17 @@ lo? string Learning objective
|
|
|
347
347
|
blooms? string Bloom's level
|
|
348
348
|
```
|
|
349
349
|
|
|
350
|
+
### Assessment JSON fixed fields
|
|
351
|
+
|
|
352
|
+
The tool writes these fields with fixed values — do not override:
|
|
353
|
+
|
|
354
|
+
```
|
|
355
|
+
"instructions": "**Submit your work for evaluation**"
|
|
356
|
+
"command": "python3 .guides/secure/unit_tests/probeable_questions/{functionName}_test.py"
|
|
357
|
+
```
|
|
358
|
+
|
|
359
|
+
The `command` runs the unit test file directly via `python3` (not `pytest`, not `-m unittest`). The overall runner still wraps execution through `python /usr/share/codio/assessments/assessments.py` — the `command` here is the path passed to that runner's `codeEnvConfig`.
|
|
360
|
+
|
|
350
361
|
### Extended return value
|
|
351
362
|
|
|
352
363
|
```
|
|
@@ -400,6 +411,22 @@ Pro-tip: Leave only `pass` in the `{functionName}` function while probing.
|
|
|
400
411
|
{Check It!|assessment}(test-XXXXXXXXXX)
|
|
401
412
|
```
|
|
402
413
|
|
|
414
|
+
### Unit Test Import Rule
|
|
415
|
+
|
|
416
|
+
**Never use `from code.functions.probeable_{functionName} import ...`** in the `unitTests` string. Python's built-in `code` module shadows the `code/` directory, causing a `ModuleNotFoundError: No module named 'code.functions'` at runtime.
|
|
417
|
+
|
|
418
|
+
Always use a `sys.path` injection instead:
|
|
419
|
+
|
|
420
|
+
```python
|
|
421
|
+
import sys
|
|
422
|
+
import unittest
|
|
423
|
+
sys.path.insert(0, '/home/codio/workspace/code/functions')
|
|
424
|
+
from probeable_{functionName} import {functionName}
|
|
425
|
+
```
|
|
426
|
+
|
|
427
|
+
This pattern must appear at the top of every `unitTests` string, before any test class definition.
|
|
428
|
+
|
|
429
|
+
|
|
403
430
|
### File naming
|
|
404
431
|
|
|
405
432
|
Files are named by `functionName` (no sequential exercise numbers). If a student or probe file with the same `functionName` already exists, the tool throws a collision error — choose a unique function name per question.
|
package/LICENSE
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
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.
|