[tasks.fmt] description = "Format activity extension" depends = ["//:install"] run = ["biome check --write .", "rumdl fmt .", "taplo format mise.toml"] [tasks.lint] description = "Lint activity extension" depends = ["//:install"] run = [ "biome ci --config-path ../.. .", "rumdl check --config ../../.rumdl.toml .", "taplo format --check --config ../../.taplo.toml mise.toml", ] [tasks.test] description = "Test activity extension" depends = ["//:install"] run = [{ task = "//:test", args = ["extensions/activity"] }] [tasks.check] description = "Check activity extension" depends = ["//:install"] run = [{ task = "//:build", args = ["activity"] }, { task = "//:build-ext", args = ["activity"] }] [tasks.verify-package] description = "Build activity and load the relocated generated package" depends = ["//:install"] run = [ { task = "//:build-ext", args = ["activity"] }, { task = "//:verify-packages", args = ["activity"] }, ] [tasks.live] description = "LIVE Pi TUI verification with a real model (uses configured credentials); evidence must stay in OS temp" depends = ["//extensions/activity:check"] raw = true env = { PI_ACTIVITY_DEBUG = "0", PI_OFFLINE = "1" } usage = ''' arg "" help="Dedicated absolute OS-temp directory for session evidence" arg "[model]" default="zai/glm-5.3" ''' run = [ '''node --input-type=module -e " import { existsSync, realpathSync } from 'node:fs'; import { tmpdir } from 'node:os'; import { dirname, isAbsolute, relative, resolve, sep } from 'node:path'; const target = process.argv[1]; const inside = (root, path) => { const rel = relative(root, path); return rel !== '..' && !rel.startsWith('..' + sep) && !isAbsolute(rel); }; if (!isAbsolute(target) || resolve(target) === resolve(tmpdir()) || !inside(resolve(tmpdir()), resolve(target))) throw new Error('Live verification requires a dedicated absolute OS-temp directory.'); let ancestor = resolve(target); while (!existsSync(ancestor)) ancestor = dirname(ancestor); if (!inside(realpathSync(tmpdir()), realpathSync(ancestor))) throw new Error('Evidence directory resolves outside OS temp.'); " "{{ usage.sessions }}"''', 'pi --offline --no-context-files --no-extensions --no-mcp --no-skills --no-prompt-templates --no-themes -e builtin:codemode -e ../../dist/activity -e demo/live.ts --tools +codemode --exclude-tools read,bash,powershell,edit,write,grep,find,ls --model "{{ usage.model }}" --thinking low --session-dir "{{ usage.sessions }}"', ] [tasks.bench] description = "Benchmark bounded plain and styled human terminal projection" depends = ["//:install"] run = "node --no-warnings __bench__/view.ts" [tasks.context] description = "Measure activity context overhead using the SDK heuristic and a scripted provider" depends = ["//:install"] run = "node --no-warnings __bench__/context.ts"