@korallis/k-pi 0.2.0 → 0.2.1
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/bundle/chunks/{chunk-6I4O4AKV.js → chunk-QA44GMU3.js} +29 -27
- package/dist/bundle/cli.js +1 -1
- package/dist/bundle/index.js +1 -1
- package/dist/bundle/rpc-entry.js +1 -1
- package/dist/kpi/graphs/coding-loop.auto.json +1 -1
- package/dist/kpi/graphs/coding-loop.gated.json +2 -2
- package/dist/kpi/kstack/generated/skills/setup-kstack/SKILL.md +7 -2
- package/dist/kpi/kstack/provenance.json +1 -1
- package/dist/kpi/prompts/ship.md +2 -2
- package/dist/kpi/skills/conventional-commit/SKILL.md +5 -3
- package/dist/kpi/templates/policy.json +0 -1
- package/package.json +1 -1
package/dist/bundle/cli.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __piCreateRequire } from "node:module"; const require = __piCreateRequire(import.meta.url);
|
|
3
|
-
import{APP_NAME,configureHttpDispatcher,main}from"./chunks/chunk-
|
|
3
|
+
import{APP_NAME,configureHttpDispatcher,main}from"./chunks/chunk-QA44GMU3.js";import"./chunks/chunk-B6RWH7WU.js";import"./chunks/chunk-JUUC5AZY.js";import"./chunks/chunk-DRQDKNXA.js";import"./chunks/chunk-TRDNDS6A.js";import"./chunks/chunk-WJZ4KLGL.js";import"./chunks/chunk-72KO4OMP.js";import"./chunks/chunk-4L3WN2XY.js";process.title=APP_NAME;process.env.PI_CODING_AGENT="true";process.env.AI_AGENT=APP_NAME;APP_NAME!=="pi"&&(process.env.PI_SKIP_VERSION_CHECK="1");process.emitWarning=(()=>{});configureHttpDispatcher();main(process.argv.slice(2));
|
package/dist/bundle/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __piCreateRequire } from "node:module"; const require = __piCreateRequire(import.meta.url);
|
|
2
|
-
import{AgentSession,AgentSessionRuntime,ArminComponent,AssistantMessageComponent,BashExecutionComponent,BorderedLoader,BranchSummaryMessageComponent,CONFIG_DIR_NAME,CURRENT_SESSION_VERSION,CompactionSummaryMessageComponent,CredentialSynchronizationError,CustomEditor,CustomMessageComponent,DEFAULT_COMPACTION_SETTINGS,DEFAULT_MAX_BYTES,DEFAULT_MAX_LINES,DefaultPackageManager,DefaultResourceLoader,DynamicBorder,ExtensionEditorComponent,ExtensionInputComponent,ExtensionRunner,ExtensionSelectorComponent,FooterComponent,InteractiveMode,LoginDialogComponent,ModelRegistry,ModelRuntime,ModelSelectorComponent,OAuthSelectorComponent,ProjectTrustStore,RpcClient,SessionManager,SessionSelectorComponent,SettingsManager,SettingsSelectorComponent,ShowImagesSelectorComponent,SkillInvocationMessageComponent,Theme,ThemeSelectorComponent,ThinkingSelectorComponent,ToolExecutionComponent,TreeSelectorComponent,UserMessageComponent,UserMessageSelectorComponent,VERSION,buildContextEntries,buildSessionContext,calculateContextTokens,collectEntriesForBranchSummary,compact,convertToLlm,convertToPng,copyToClipboard,createAgentSession,createAgentSessionFromServices,createAgentSessionRuntime,createAgentSessionServices,createBashTool,createBashToolDefinition,createCodingTools,createEditTool,createEditToolDefinition,createEventBus,createExtensionRuntime,createFindTool,createFindToolDefinition,createGrepTool,createGrepToolDefinition,createLocalBashOperations,createLocalPowerShellOperations,createLsTool,createLsToolDefinition,createPowerShellTool,createPowerShellToolDefinition,createReadOnlyTools,createReadTool,createReadToolDefinition,createSyntheticSourceInfo,createWriteTool,createWriteToolDefinition,defineTool,detectSupportedImageMimeTypeFromFile,discoverAndLoadExtensions,estimateTokens,findCutPoint,findTurnStartIndex,formatDimensionNote,formatSize,formatSkillsForPrompt,generateBranchSummary,generateDiffString,generateSummary,generateSummaryWithUsage,generateUnifiedPatch,getAgentDir,getDocsPath,getExamplesPath,getLanguageFromPath,getLastAssistantUsage,getLatestCompactionEntry,getMarkdownTheme,getPackageDir,getPowerShellConfig,getReadmePath,getSelectListTheme,getSettingsListTheme,getShellConfig,hasTrustRequiringProjectResources,highlightCode,initTheme,isBashToolResult,isEditToolResult,isFindToolResult,isGrepToolResult,isLsToolResult,isPowerShellToolResult,isReadToolResult,isToolCallEventType,isWriteToolResult,keyHint,keyText,loadProjectContextFiles,loadSkills,loadSkillsFromDir,main,migrateSessionEntries,parseArgs,parseFrontmatter,parseSessionEntries,parseSkillBlock,prepareBranchEntries,rawKeyHint,readStoredCredential,renderDiff,resizeImage,resolveCliModel,resolveModelScopeWithDiagnostics,runPrintMode,runRpcMode,serializeConversation,sessionEntryToContextMessages,shouldCompact,stripFrontmatter,truncateHead,truncateLine,truncateTail,truncateToVisualLines,withFileMutationQueue,wrapRegisteredTool,wrapRegisteredTools}from"./chunks/chunk-
|
|
2
|
+
import{AgentSession,AgentSessionRuntime,ArminComponent,AssistantMessageComponent,BashExecutionComponent,BorderedLoader,BranchSummaryMessageComponent,CONFIG_DIR_NAME,CURRENT_SESSION_VERSION,CompactionSummaryMessageComponent,CredentialSynchronizationError,CustomEditor,CustomMessageComponent,DEFAULT_COMPACTION_SETTINGS,DEFAULT_MAX_BYTES,DEFAULT_MAX_LINES,DefaultPackageManager,DefaultResourceLoader,DynamicBorder,ExtensionEditorComponent,ExtensionInputComponent,ExtensionRunner,ExtensionSelectorComponent,FooterComponent,InteractiveMode,LoginDialogComponent,ModelRegistry,ModelRuntime,ModelSelectorComponent,OAuthSelectorComponent,ProjectTrustStore,RpcClient,SessionManager,SessionSelectorComponent,SettingsManager,SettingsSelectorComponent,ShowImagesSelectorComponent,SkillInvocationMessageComponent,Theme,ThemeSelectorComponent,ThinkingSelectorComponent,ToolExecutionComponent,TreeSelectorComponent,UserMessageComponent,UserMessageSelectorComponent,VERSION,buildContextEntries,buildSessionContext,calculateContextTokens,collectEntriesForBranchSummary,compact,convertToLlm,convertToPng,copyToClipboard,createAgentSession,createAgentSessionFromServices,createAgentSessionRuntime,createAgentSessionServices,createBashTool,createBashToolDefinition,createCodingTools,createEditTool,createEditToolDefinition,createEventBus,createExtensionRuntime,createFindTool,createFindToolDefinition,createGrepTool,createGrepToolDefinition,createLocalBashOperations,createLocalPowerShellOperations,createLsTool,createLsToolDefinition,createPowerShellTool,createPowerShellToolDefinition,createReadOnlyTools,createReadTool,createReadToolDefinition,createSyntheticSourceInfo,createWriteTool,createWriteToolDefinition,defineTool,detectSupportedImageMimeTypeFromFile,discoverAndLoadExtensions,estimateTokens,findCutPoint,findTurnStartIndex,formatDimensionNote,formatSize,formatSkillsForPrompt,generateBranchSummary,generateDiffString,generateSummary,generateSummaryWithUsage,generateUnifiedPatch,getAgentDir,getDocsPath,getExamplesPath,getLanguageFromPath,getLastAssistantUsage,getLatestCompactionEntry,getMarkdownTheme,getPackageDir,getPowerShellConfig,getReadmePath,getSelectListTheme,getSettingsListTheme,getShellConfig,hasTrustRequiringProjectResources,highlightCode,initTheme,isBashToolResult,isEditToolResult,isFindToolResult,isGrepToolResult,isLsToolResult,isPowerShellToolResult,isReadToolResult,isToolCallEventType,isWriteToolResult,keyHint,keyText,loadProjectContextFiles,loadSkills,loadSkillsFromDir,main,migrateSessionEntries,parseArgs,parseFrontmatter,parseSessionEntries,parseSkillBlock,prepareBranchEntries,rawKeyHint,readStoredCredential,renderDiff,resizeImage,resolveCliModel,resolveModelScopeWithDiagnostics,runPrintMode,runRpcMode,serializeConversation,sessionEntryToContextMessages,shouldCompact,stripFrontmatter,truncateHead,truncateLine,truncateTail,truncateToVisualLines,withFileMutationQueue,wrapRegisteredTool,wrapRegisteredTools}from"./chunks/chunk-QA44GMU3.js";import"./chunks/chunk-B6RWH7WU.js";import"./chunks/chunk-JUUC5AZY.js";import"./chunks/chunk-DRQDKNXA.js";import"./chunks/chunk-TRDNDS6A.js";import"./chunks/chunk-WJZ4KLGL.js";import"./chunks/chunk-72KO4OMP.js";import"./chunks/chunk-4L3WN2XY.js";export{AgentSession,AgentSessionRuntime,ArminComponent,AssistantMessageComponent,BashExecutionComponent,BorderedLoader,BranchSummaryMessageComponent,CONFIG_DIR_NAME,CURRENT_SESSION_VERSION,CompactionSummaryMessageComponent,CredentialSynchronizationError,CustomEditor,CustomMessageComponent,DEFAULT_COMPACTION_SETTINGS,DEFAULT_MAX_BYTES,DEFAULT_MAX_LINES,DefaultPackageManager,DefaultResourceLoader,DynamicBorder,ExtensionEditorComponent,ExtensionInputComponent,ExtensionRunner,ExtensionSelectorComponent,FooterComponent,InteractiveMode,LoginDialogComponent,ModelRegistry,ModelRuntime,ModelSelectorComponent,OAuthSelectorComponent,ProjectTrustStore,RpcClient,SessionManager,SessionSelectorComponent,SettingsManager,SettingsSelectorComponent,ShowImagesSelectorComponent,SkillInvocationMessageComponent,Theme,ThemeSelectorComponent,ThinkingSelectorComponent,ToolExecutionComponent,TreeSelectorComponent,UserMessageComponent,UserMessageSelectorComponent,VERSION,buildContextEntries,buildSessionContext,calculateContextTokens,collectEntriesForBranchSummary,compact,convertToLlm,convertToPng,copyToClipboard,createAgentSession,createAgentSessionFromServices,createAgentSessionRuntime,createAgentSessionServices,createBashTool,createBashToolDefinition,createCodingTools,createEditTool,createEditToolDefinition,createEventBus,createExtensionRuntime,createFindTool,createFindToolDefinition,createGrepTool,createGrepToolDefinition,createLocalBashOperations,createLocalPowerShellOperations,createLsTool,createLsToolDefinition,createPowerShellTool,createPowerShellToolDefinition,createReadOnlyTools,createReadTool,createReadToolDefinition,createSyntheticSourceInfo,createWriteTool,createWriteToolDefinition,defineTool,detectSupportedImageMimeTypeFromFile,discoverAndLoadExtensions,estimateTokens,findCutPoint,findTurnStartIndex,formatDimensionNote,formatSize,formatSkillsForPrompt,generateBranchSummary,generateDiffString,generateSummary,generateSummaryWithUsage,generateUnifiedPatch,getAgentDir,getDocsPath,getExamplesPath,getLanguageFromPath,getLastAssistantUsage,getLatestCompactionEntry,getMarkdownTheme,getPackageDir,getPowerShellConfig,getReadmePath,getSelectListTheme,getSettingsListTheme,getShellConfig,hasTrustRequiringProjectResources,highlightCode,initTheme,isBashToolResult,isEditToolResult,isFindToolResult,isGrepToolResult,isLsToolResult,isPowerShellToolResult,isReadToolResult,isToolCallEventType,isWriteToolResult,keyHint,keyText,loadProjectContextFiles,loadSkills,loadSkillsFromDir,main,migrateSessionEntries,parseArgs,parseFrontmatter,parseSessionEntries,parseSkillBlock,prepareBranchEntries,rawKeyHint,readStoredCredential,renderDiff,resizeImage,resolveCliModel,resolveModelScopeWithDiagnostics,runPrintMode,runRpcMode,serializeConversation,sessionEntryToContextMessages,shouldCompact,stripFrontmatter,truncateHead,truncateLine,truncateTail,truncateToVisualLines,withFileMutationQueue,wrapRegisteredTool,wrapRegisteredTools};
|
package/dist/bundle/rpc-entry.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __piCreateRequire } from "node:module"; const require = __piCreateRequire(import.meta.url);
|
|
3
|
-
import{APP_NAME,configureHttpDispatcher,main}from"./chunks/chunk-
|
|
3
|
+
import{APP_NAME,configureHttpDispatcher,main}from"./chunks/chunk-QA44GMU3.js";import"./chunks/chunk-B6RWH7WU.js";import"./chunks/chunk-JUUC5AZY.js";import"./chunks/chunk-DRQDKNXA.js";import"./chunks/chunk-TRDNDS6A.js";import"./chunks/chunk-WJZ4KLGL.js";import"./chunks/chunk-72KO4OMP.js";import"./chunks/chunk-4L3WN2XY.js";process.title=`${APP_NAME}-rpc`;process.env.PI_CODING_AGENT="true";process.env.AI_AGENT=APP_NAME;process.emitWarning=(()=>{});configureHttpDispatcher();main(["--mode","rpc",...process.argv.slice(2)]);
|
|
@@ -146,7 +146,7 @@
|
|
|
146
146
|
{
|
|
147
147
|
"id": "ship",
|
|
148
148
|
"type": "agent",
|
|
149
|
-
"prompt": "Apply the conventional-commit skill.
|
|
149
|
+
"prompt": "Apply the conventional-commit skill. The control plane has put the worktree on the job branch kpi/{{job_id}}; stay on it. Stage the approved candidate with git add, then create exactly one approved commit whose subject matches ^(feat|fix|docs|refactor|test|chore)(\\(.+\\))?: and whose message ends with this exact trailer line, with no quoting or punctuation around it:\nKPI-Job: {{job_id}}\nThat trailer is how the control plane recognises this job's commit, so it must appear exactly once. If the repository has an origin remote, push exactly that branch with: git push -u origin kpi/{{job_id}}\nthen open the pull request with: gh pr create --head kpi/{{job_id}} --fill\nNever push any other branch, never force-push, never push tags, never delete a branch, and never merge: the auto-merge workflow merges after the required check passes.",
|
|
150
150
|
"context": {
|
|
151
151
|
"mode": "thread",
|
|
152
152
|
"threadKey": "ship"
|
|
@@ -139,13 +139,13 @@
|
|
|
139
139
|
"id": "human",
|
|
140
140
|
"type": "human",
|
|
141
141
|
"title": "Approve gated release",
|
|
142
|
-
"question": "All quality gates and isolated review are green. Approve this change for commit?",
|
|
142
|
+
"question": "All quality gates and isolated review are green. Approve this change for a commit on the job branch, a push of that branch to origin, and a pull request?",
|
|
143
143
|
"statePath": "release.approved"
|
|
144
144
|
},
|
|
145
145
|
{
|
|
146
146
|
"id": "ship",
|
|
147
147
|
"type": "agent",
|
|
148
|
-
"prompt": "Apply the conventional-commit skill.
|
|
148
|
+
"prompt": "Apply the conventional-commit skill. The control plane has put the worktree on the job branch kpi/{{job_id}}; stay on it. Stage the approved candidate with git add, then create exactly one approved commit whose subject matches ^(feat|fix|docs|refactor|test|chore)(\\(.+\\))?: and whose message ends with this exact trailer line, with no quoting or punctuation around it:\nKPI-Job: {{job_id}}\nThat trailer is how the control plane recognises this job's commit, so it must appear exactly once. If the repository has an origin remote, push exactly that branch with: git push -u origin kpi/{{job_id}}\nthen open the pull request with: gh pr create --head kpi/{{job_id}} --fill\nNever push any other branch, never force-push, never push tags, never delete a branch, and never merge: the auto-merge workflow merges after the required check passes.",
|
|
149
149
|
"context": {
|
|
150
150
|
"mode": "thread",
|
|
151
151
|
"threadKey": "ship"
|
|
@@ -19,6 +19,9 @@ model id.
|
|
|
19
19
|
the ladder's confidence for that role.
|
|
20
20
|
- `review_panel` takes models from different families, in ladder order, capped at
|
|
21
21
|
three, because a panel of one family reviews its own habits.
|
|
22
|
+
- `fallback_models` is the exact live cross-provider order used only after every
|
|
23
|
+
account slot for the current provider is low or exhausted. The command derives
|
|
24
|
+
it from the ladder and lets the operator edit it before the atomic write.
|
|
22
25
|
- A role with no live match is written as `inherit-parent`: it runs on the parent
|
|
23
26
|
session's model.
|
|
24
27
|
- Any line may be edited before the file is written. An edit that names a slug
|
|
@@ -38,8 +41,10 @@ model id.
|
|
|
38
41
|
| review_panel | the ordered cross-family review panel |
|
|
39
42
|
|
|
40
43
|
No remote runner is ever offered, and no slug is required as a default.
|
|
41
|
-
Failover stays in the K-π accounts balancer
|
|
42
|
-
|
|
44
|
+
Failover stays in the K-π accounts balancer. It preserves the exact model while
|
|
45
|
+
healthy sibling subscription slots remain, hands off at 5% remaining or on a
|
|
46
|
+
classified limit, and only then follows `fallback_models`. Slots live in
|
|
47
|
+
`accounts.json`.
|
|
43
48
|
|
|
44
49
|
## After the model map
|
|
45
50
|
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"commit": "7314f723a487ec406b6369fe5865ba034cfed166",
|
|
6
6
|
"treeOid": "ae6fff5803260f38f075feb8c3b008ed68153fa0"
|
|
7
7
|
},
|
|
8
|
-
"transformVersion": "
|
|
8
|
+
"transformVersion": "ef511cf6b45fc2d0e249bf1882674ecfa9c9eee84c881e2c8c1c42affef44405",
|
|
9
9
|
"patches": [],
|
|
10
10
|
"license": {
|
|
11
11
|
"path": "LICENSE",
|
package/dist/kpi/prompts/ship.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
|
-
description: Commit an approved
|
|
2
|
+
description: Commit an approved run on its job branch, push it, and open the pull request
|
|
3
3
|
argument-hint: "[job-id]"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
Ship `$ARGUMENTS` or the active run only after human approval. Apply the `conventional-commit` skill and create exactly one local commit whose subject matches `^(feat|fix|docs|refactor|test|chore)(\(.+\))?: `. Include only the approved candidate. Never push, deploy, or amend unrelated history.
|
|
6
|
+
Ship `$ARGUMENTS` or the active run only after human approval. Apply the `conventional-commit` skill and create exactly one local commit on the job branch `kpi/<job-id>` whose subject matches `^(feat|fix|docs|refactor|test|chore)(\(.+\))?: `. Include only the approved candidate. If the repository has an `origin` remote, push exactly that branch (`git push -u origin kpi/<job-id>`) and open the pull request (`gh pr create --head kpi/<job-id> --fill`). Never push any other branch, force-push, push tags, delete a branch, merge, deploy, or amend unrelated history: the auto-merge workflow merges after the required check passes.
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: conventional-commit
|
|
3
|
-
description: Use only in the ship node after
|
|
3
|
+
description: Use only in the ship node after release approval to create the job's commit, push its branch, and open the pull request.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Conventional commit
|
|
7
7
|
|
|
8
|
-
Create exactly one local commit for the approved candidate. Its subject must match:
|
|
8
|
+
Create exactly one local commit for the approved candidate, on the job branch `kpi/<job-id>` the control plane checked out. Its subject must match:
|
|
9
9
|
|
|
10
10
|
`^(feat|fix|docs|refactor|test|chore)(\(.+\))?: `
|
|
11
11
|
|
|
12
|
-
Choose the narrowest accurate type and optional scope. Use an imperative summary tied to the frozen goal. Do not amend unrelated history,
|
|
12
|
+
Choose the narrowest accurate type and optional scope. Use an imperative summary tied to the frozen goal. Do not amend unrelated history, deploy, or include files outside the approved candidate.
|
|
13
|
+
|
|
14
|
+
When the repository has an `origin` remote, push exactly the job branch with `git push -u origin kpi/<job-id>` and open the pull request with `gh pr create --head kpi/<job-id> --fill`. Never push any other branch, force-push, push tags, delete a branch, or merge: merging is the auto-merge workflow's decision after the required check passes.
|