@aiwg/cli 2026.9.0 → 2026.9.2
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/agentic/code/providers/capability-matrix.yaml +41 -0
- package/agentic/code/providers/model-capabilities.v1.json +11 -0
- package/agentic/code/providers/model-catalog.v1.json +8 -0
- package/agentic/code/providers/pi/aiwg-bridge.ts +26 -0
- package/bin/aiwg.mjs +15 -3
- package/dist/src/api/index.d.ts +3 -0
- package/dist/src/api/index.js +3 -0
- package/dist/src/auth/credential-store.js +6 -0
- package/dist/src/channel/manager.mjs +2 -2
- package/dist/src/cli/handlers/dataset.js +186 -0
- package/dist/src/cli/handlers/help.js +2 -1
- package/dist/src/cli/handlers/index.js +5 -1
- package/dist/src/cli/handlers/init.js +1 -0
- package/dist/src/cli/handlers/output-mode.js +18 -1
- package/dist/src/cli/handlers/run.js +11 -3
- package/dist/src/cli/handlers/schema.js +221 -0
- package/dist/src/cli/handlers/sessions.js +30 -12
- package/dist/src/cli/handlers/steward.js +11 -1
- package/dist/src/cli/handlers/use.js +6 -2
- package/dist/src/cli/hooks/builtin/activity-log-hook.js +6 -0
- package/dist/src/cli/router.js +1 -1
- package/dist/src/cli/scope-resolver.js +22 -0
- package/dist/src/dataset/adapter-sdk.d.ts +41 -0
- package/dist/src/dataset/adapter-sdk.js +147 -0
- package/dist/src/dataset/adapter-types.d.ts +179 -0
- package/dist/src/dataset/adapter-types.js +2 -0
- package/dist/src/dataset/adapters.d.ts +104 -0
- package/dist/src/dataset/adapters.js +518 -0
- package/dist/src/dataset/conformance-types.d.ts +84 -0
- package/dist/src/dataset/conformance-types.js +3 -0
- package/dist/src/dataset/conformance.d.ts +13 -0
- package/dist/src/dataset/conformance.js +90 -0
- package/dist/src/dataset/contracts.d.ts +17 -0
- package/dist/src/dataset/contracts.js +236 -0
- package/dist/src/dataset/file-orchestration-repository.d.ts +19 -0
- package/dist/src/dataset/file-orchestration-repository.js +68 -0
- package/dist/src/dataset/fortemi-execution-bridge.d.ts +33 -0
- package/dist/src/dataset/fortemi-execution-bridge.js +35 -0
- package/dist/src/dataset/index.d.ts +21 -0
- package/dist/src/dataset/index.js +21 -0
- package/dist/src/dataset/ledger-types.d.ts +141 -0
- package/dist/src/dataset/ledger-types.js +2 -0
- package/dist/src/dataset/ledger.d.ts +27 -0
- package/dist/src/dataset/ledger.js +100 -0
- package/dist/src/dataset/local-execution-backend.d.ts +10 -0
- package/dist/src/dataset/local-execution-backend.js +32 -0
- package/dist/src/dataset/orchestration-repository.d.ts +29 -0
- package/dist/src/dataset/orchestration-repository.js +34 -0
- package/dist/src/dataset/orchestration-service.d.ts +56 -0
- package/dist/src/dataset/orchestration-service.js +466 -0
- package/dist/src/dataset/orchestration-types.d.ts +83 -0
- package/dist/src/dataset/orchestration-types.js +2 -0
- package/dist/src/dataset/presentation.d.ts +3 -0
- package/dist/src/dataset/presentation.js +8 -0
- package/dist/src/dataset/projections.d.ts +42 -0
- package/dist/src/dataset/projections.js +192 -0
- package/dist/src/dataset/schema-governance.d.ts +71 -0
- package/dist/src/dataset/schema-governance.js +135 -0
- package/dist/src/dataset/standards-types.d.ts +66 -0
- package/dist/src/dataset/standards-types.js +10 -0
- package/dist/src/dataset/standards.d.ts +13 -0
- package/dist/src/dataset/standards.js +291 -0
- package/dist/src/dataset/types.d.ts +258 -0
- package/dist/src/dataset/types.js +2 -0
- package/dist/src/extensions/commands/definitions.js +27 -1
- package/dist/src/installation/manager.mjs +5 -1
- package/dist/src/models/model-capabilities.v1.json +11 -0
- package/dist/src/models/model-catalog.v1.json +8 -0
- package/dist/src/models/model-discovery.js +32 -0
- package/dist/src/models/provider-policy.js +3 -2
- package/dist/src/output-modes/index.js +4 -0
- package/dist/src/output-modes/registry.js +68 -24
- package/dist/src/output-modes/runtime.js +10 -8
- package/dist/src/plugin/skill-command-translator.js +1 -0
- package/dist/src/providers/capability-matrix.yaml +41 -0
- package/dist/src/providers/provider-definitions.js +72 -0
- package/dist/src/providers/provider-inventory.js +1 -0
- package/dist/src/schema/catalog.js +234 -0
- package/dist/src/schema/compatibility.js +42 -0
- package/dist/src/schema/diagnostics.js +36 -0
- package/dist/src/schema/index.js +8 -0
- package/dist/src/schema/policy.js +58 -0
- package/dist/src/schema/resolver.js +76 -0
- package/dist/src/schema/types.js +2 -0
- package/dist/src/schema/validator.js +82 -0
- package/dist/src/sessions/adapters/pi.js +141 -0
- package/dist/src/sessions/contracts.js +1 -1
- package/dist/src/sessions/index.js +1 -0
- package/dist/src/sessions/workspace-discovery.js +10 -0
- package/dist/src/storage/backends/fortemi.js +6 -0
- package/dist/src/storage/config.js +18 -4
- package/dist/src/storage/fortemi-qualification.js +106 -0
- package/dist/src/storage/index.js +1 -0
- package/dist/src/storage/types.js +1 -1
- package/package.json +3 -1
- package/schemas/dataset/conformance-manifest.v1.schema.json +35 -0
- package/schemas/dataset/conformance-receipt.v1.schema.json +22 -0
- package/schemas/dataset/dataset-contracts.v1.schema.json +117 -0
- package/schemas/dataset/dataset-deprecations.v1.schema.json +37 -0
- package/schemas/dataset/dataset-schema-governance.v1.schema.json +92 -0
- package/schemas/dataset/dataset-standards-exchange.v1.schema.json +59 -0
- package/schemas/dataset/profiles/openlineage-1.0.0.schema.json +15 -0
- package/schemas/dataset/profiles/prov-json-20130430.schema.json +12 -0
- package/schemas/dataset/run-ledger.v1.schema.json +39 -0
- package/schemas/dataset/source-adapter.v1.schema.json +112 -0
- package/tools/agents/deploy-agents.mjs +9 -3
- package/tools/agents/providers/pi.mjs +176 -0
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* --rules-only Deploy only rules (skip agents)
|
|
21
21
|
* --dry-run Show what would be deployed without writing
|
|
22
22
|
* --force Overwrite existing files
|
|
23
|
-
* --provider <name> Target provider: claude (default), openai, codex, cursor, opencode, copilot, factory, warp, devin, hermes, or openclaw
|
|
23
|
+
* --provider <name> Target provider: claude (default), openai, codex, cursor, opencode, copilot, factory, pi, warp, devin, hermes, or openclaw
|
|
24
24
|
* --model <name> Override model for all tiers (blanket)
|
|
25
25
|
* --reasoning-model <name> Override model for reasoning tasks
|
|
26
26
|
* --coding-model <name> Override model for coding tasks
|
|
@@ -52,6 +52,7 @@
|
|
|
52
52
|
* devin - Devin Desktop - .windsurf/agents/, .windsurf/workflows/, .windsurf/skills/, .windsurf/rules/
|
|
53
53
|
* windsurf - Deprecated alias for devin
|
|
54
54
|
* openclaw - OpenClaw - ~/.openclaw/agents/, ~/.openclaw/commands/, ~/.openclaw/skills/, ~/.openclaw/rules/, ~/.openclaw/behaviors/
|
|
55
|
+
* pi - Pi Coding Agent - .agents/skills/, .pi/skills/, .pi/prompts/, AGENTS.md
|
|
55
56
|
*
|
|
56
57
|
* Defaults:
|
|
57
58
|
* --source resolves relative to this script's repo root (../..)
|
|
@@ -108,9 +109,10 @@ const PROVIDER_ALIASES = {
|
|
|
108
109
|
'devin-desktop': 'windsurf',
|
|
109
110
|
'devin-local': 'windsurf',
|
|
110
111
|
'cascade': 'windsurf',
|
|
112
|
+
'pi-coding-agent': 'pi',
|
|
111
113
|
};
|
|
112
114
|
|
|
113
|
-
const AVAILABLE_PROVIDERS = ['claude', 'factory', 'codex', 'opencode', 'copilot', 'cursor', 'warp', 'windsurf', 'hermes', 'openclaw', 'openhuman'];
|
|
115
|
+
const AVAILABLE_PROVIDERS = ['claude', 'factory', 'codex', 'opencode', 'copilot', 'cursor', 'pi', 'warp', 'windsurf', 'hermes', 'openclaw', 'openhuman'];
|
|
114
116
|
|
|
115
117
|
const UNSUPPORTED_PROVIDER_HINTS = {
|
|
116
118
|
'devin-cli': [
|
|
@@ -152,7 +154,7 @@ const MIRRORED_KERNEL_COMMAND_SKILLS = new Set([
|
|
|
152
154
|
]);
|
|
153
155
|
|
|
154
156
|
function providerUsesSkillsNatively(providerName) {
|
|
155
|
-
return ['claude', 'cursor', 'hermes', 'openhuman'].includes(providerName);
|
|
157
|
+
return ['claude', 'cursor', 'hermes', 'openhuman', 'pi'].includes(providerName);
|
|
156
158
|
}
|
|
157
159
|
|
|
158
160
|
function shouldMirrorStandardCommandSkill(skillName) {
|
|
@@ -762,6 +764,10 @@ function deepMerge(target, source) {
|
|
|
762
764
|
async function promptCommandsMigration(cfg, provider, targetDir) {
|
|
763
765
|
// Home-directory providers share commands across projects — do not delete.
|
|
764
766
|
if (provider.capabilities?.homeDirectoryDeploy) return false;
|
|
767
|
+
// Some providers intentionally expose both surfaces with different runtime
|
|
768
|
+
// semantics. Pi prompt templates (/name) are not aliases for Agent Skills
|
|
769
|
+
// (/skill:name), so command-to-skill migration would destroy valid prompts.
|
|
770
|
+
if (provider.capabilities?.parallelCommandAndSkillSurfaces) return false;
|
|
765
771
|
|
|
766
772
|
const commandsRelPath = provider.paths?.commands;
|
|
767
773
|
if (!commandsRelPath) return false;
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pi Coding Agent provider.
|
|
3
|
+
*
|
|
4
|
+
* Verified against earendil-works/pi commit
|
|
5
|
+
* 79680533c6b898894f2d2421c7f640b212d3dfdd on 2026-09-03.
|
|
6
|
+
* Pi discovers project skills in .agents/skills and .pi/skills, prompt
|
|
7
|
+
* templates in .pi/prompts, and context through the root-to-cwd AGENTS chain.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import path from 'path';
|
|
11
|
+
import fs from 'fs';
|
|
12
|
+
import {
|
|
13
|
+
collectFrameworkArtifacts,
|
|
14
|
+
createAgentsMdFromTemplate,
|
|
15
|
+
deployFiles,
|
|
16
|
+
deploySkillsWithKernelRouting,
|
|
17
|
+
ensureDir,
|
|
18
|
+
getAddonAgentFiles,
|
|
19
|
+
getAddonCommandFiles,
|
|
20
|
+
getAddonSkillDirs,
|
|
21
|
+
normalizeDeploymentMode,
|
|
22
|
+
resolveAiwgRoot,
|
|
23
|
+
} from './base.mjs';
|
|
24
|
+
|
|
25
|
+
export const name = 'pi';
|
|
26
|
+
export const aliases = ['pi-coding-agent'];
|
|
27
|
+
|
|
28
|
+
export const paths = {
|
|
29
|
+
agents: '',
|
|
30
|
+
commands: '.pi/prompts',
|
|
31
|
+
skills: '.pi/.aiwg/skills',
|
|
32
|
+
rules: '',
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export const extensionBridge = 'agentic/code/providers/pi/aiwg-bridge.ts';
|
|
36
|
+
|
|
37
|
+
export const kernelSkillsPath = '.agents/skills';
|
|
38
|
+
|
|
39
|
+
export const support = {
|
|
40
|
+
agents: 'skills',
|
|
41
|
+
commands: 'native',
|
|
42
|
+
skills: 'native',
|
|
43
|
+
rules: 'context',
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
export const capabilities = {
|
|
47
|
+
skills: true,
|
|
48
|
+
rules: false,
|
|
49
|
+
aggregatedOutput: false,
|
|
50
|
+
yamlFormat: true,
|
|
51
|
+
homeDirectoryDeploy: false,
|
|
52
|
+
parallelCommandAndSkillSurfaces: true,
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export function mapModel(originalModel) {
|
|
56
|
+
return originalModel;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function transformAgent(_srcPath, content) {
|
|
60
|
+
return content;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function transformCommand(_srcPath, content) {
|
|
64
|
+
const match = content.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n([\s\S]*)$/);
|
|
65
|
+
if (!match) {
|
|
66
|
+
return `---\ndescription: AIWG prompt template\n---\n\n${content.trim()}\n`;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const frontmatter = match[1];
|
|
70
|
+
const body = match[2].trim();
|
|
71
|
+
const description = frontmatter.match(/^description:\s*(.+)$/m)?.[1]?.trim()
|
|
72
|
+
|| body.split(/\r?\n/).find(line => line.trim())?.trim()
|
|
73
|
+
|| 'AIWG prompt template';
|
|
74
|
+
const argumentHint = frontmatter.match(/^argument-hint:\s*(.+)$/m)?.[1]?.trim();
|
|
75
|
+
const piFrontmatter = [
|
|
76
|
+
'---',
|
|
77
|
+
`description: ${description}`,
|
|
78
|
+
...(argumentHint ? [`argument-hint: ${argumentHint}`] : []),
|
|
79
|
+
'---',
|
|
80
|
+
].join('\n');
|
|
81
|
+
const hasArgumentExpansion = /\$(?:@|ARGUMENTS|[1-9]\d*)|\$\{(?:@|ARGUMENTS|[1-9]\d*)(?::[^}]*)?\}/.test(body);
|
|
82
|
+
const argumentBridge = argumentHint && !hasArgumentExpansion
|
|
83
|
+
? '\n\nInvocation arguments: $@'
|
|
84
|
+
: '';
|
|
85
|
+
return `${piFrontmatter}\n\n${body}${argumentBridge}\n`;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function deployAgents() {
|
|
89
|
+
// Pi has no discrete persona-file surface. Agent-to-skill projection is
|
|
90
|
+
// handled by the canonical skill deployment path.
|
|
91
|
+
return 0;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export function deployCommands(commandFiles, targetDir, opts) {
|
|
95
|
+
const destDir = path.join(targetDir, paths.commands);
|
|
96
|
+
ensureDir(destDir, opts.dryRun);
|
|
97
|
+
return deployFiles(commandFiles, destDir, opts, transformCommand);
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
export function deploySkills(skillDirs, targetDir, opts) {
|
|
101
|
+
return deploySkillsWithKernelRouting(
|
|
102
|
+
skillDirs,
|
|
103
|
+
path.join(targetDir, paths.skills),
|
|
104
|
+
path.join(targetDir, kernelSkillsPath),
|
|
105
|
+
{ ...opts, copyStandardSkills: opts.copyStandardSkills === true },
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export function deployRules() {
|
|
110
|
+
// Pi reads rule guidance from AGENTS.md; standalone rule projection is
|
|
111
|
+
// intentionally deferred until the context deployment issue.
|
|
112
|
+
return 0;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export function deployExtensionBridge(targetDir, opts) {
|
|
116
|
+
const source = path.join(resolveAiwgRoot(opts.srcRoot) || opts.srcRoot, extensionBridge);
|
|
117
|
+
if (!fs.existsSync(source)) return 0;
|
|
118
|
+
const destination = path.join(targetDir, '.pi/extensions');
|
|
119
|
+
ensureDir(destination, opts.dryRun);
|
|
120
|
+
return deployFiles([source], destination, opts);
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export function createAgentsMd(target, srcRoot, dryRun) {
|
|
124
|
+
const aiwgRoot = resolveAiwgRoot(srcRoot) || srcRoot;
|
|
125
|
+
createAgentsMdFromTemplate(target, aiwgRoot, 'pi/AGENTS.md.aiwg-template', dryRun);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export async function postDeploy(targetDir, opts) {
|
|
129
|
+
if (opts.createAgentsMd || (!opts.commandsOnly && !opts.skillsOnly && !opts.rulesOnly)) {
|
|
130
|
+
createAgentsMd(targetDir, opts.srcRoot, opts.dryRun);
|
|
131
|
+
}
|
|
132
|
+
if (!opts.quiet && (opts.deployCommands || opts.deploySkills || opts.commandsOnly || opts.skillsOnly)) {
|
|
133
|
+
console.log('Pi project resources are trust-gated; approve the project with `/trust` (restart required) or use `pi --approve` for a reviewed one-shot run.');
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
export function getFileExtension() {
|
|
138
|
+
return '.md';
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
export async function deploy(opts) {
|
|
142
|
+
const normalizedMode = normalizeDeploymentMode(opts.mode);
|
|
143
|
+
const agentFiles = [];
|
|
144
|
+
const commandFiles = [];
|
|
145
|
+
const skillDirs = [];
|
|
146
|
+
|
|
147
|
+
if (['general', 'sdlc', 'both', 'all'].includes(normalizedMode)) {
|
|
148
|
+
agentFiles.push(...getAddonAgentFiles(opts.srcRoot));
|
|
149
|
+
if (opts.deployCommands || opts.commandsOnly) commandFiles.push(...getAddonCommandFiles(opts.srcRoot));
|
|
150
|
+
if (opts.deploySkills || opts.skillsOnly) skillDirs.push(...getAddonSkillDirs(opts.srcRoot));
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
const framework = collectFrameworkArtifacts(opts.srcRoot, normalizedMode, {
|
|
154
|
+
includeAgents: true,
|
|
155
|
+
includeCommands: opts.deployCommands || opts.commandsOnly,
|
|
156
|
+
includeSkills: opts.deploySkills || opts.skillsOnly,
|
|
157
|
+
includeRules: false,
|
|
158
|
+
});
|
|
159
|
+
agentFiles.push(...framework.agents);
|
|
160
|
+
commandFiles.push(...framework.commands);
|
|
161
|
+
skillDirs.push(...framework.skills);
|
|
162
|
+
|
|
163
|
+
let count = 0;
|
|
164
|
+
if (!opts.commandsOnly && !opts.skillsOnly && !opts.rulesOnly) count += deployAgents(agentFiles, opts.target, opts);
|
|
165
|
+
if ((opts.deployCommands || opts.commandsOnly) && !opts.skillsOnly && !opts.rulesOnly) count += deployCommands(commandFiles, opts.target, opts);
|
|
166
|
+
if ((opts.deploySkills || opts.skillsOnly) && !opts.commandsOnly && !opts.rulesOnly) count += deploySkills(skillDirs, opts.target, opts);
|
|
167
|
+
if (!opts.commandsOnly && !opts.skillsOnly && !opts.rulesOnly) count += deployExtensionBridge(opts.target, opts);
|
|
168
|
+
await postDeploy(opts.target, opts);
|
|
169
|
+
return count;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export default {
|
|
173
|
+
name, aliases, paths, kernelSkillsPath, support, capabilities,
|
|
174
|
+
mapModel, transformAgent, transformCommand, deployAgents, deployCommands,
|
|
175
|
+
deploySkills, deployRules, deployExtensionBridge, createAgentsMd, postDeploy, getFileExtension, deploy,
|
|
176
|
+
};
|