@codio-ai/opencode-authoring-agent 0.1.6 → 0.1.7

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;AAWxB,wBAAgB,wBAAwB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,EAAE,CA6BvE;AAED,eAAO,MAAM,UAAU,+EAMb,CAAC;AAEX,eAAO,MAAM,YAA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AO,MAAM,UAAU,+EAMb,CAAC;AAEX,eAAO,MAAM,YAAY,uCAAwC,CAAC;AAElE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;iBAiC/B,CAAC;AAEJ,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE,MAAM,WAAW,SAAS;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,UAAU,CAAC;IACxB,MAAM,EAAE,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAC;IACtC,KAAK,EAAE,SAAS,EAAE,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;IACrB,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,eAAe,GAAG,QAAQ,CAgB9D;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;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"}
@@ -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.6",
3
+ "version": "0.1.7",
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",
@@ -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
  ```