create-principles-disciple 1.73.0 → 1.75.0
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/LICENSE +21 -21
- package/README.md +24 -0
- package/console/dist/server/index.js +13 -1
- package/console/dist/server/routes/agents.js +3 -118
- package/console/dist/server/routes/update-history.d.ts +12 -0
- package/console/dist/server/routes/update-history.js +52 -0
- package/console/dist/server/routes/update.d.ts +10 -0
- package/console/dist/server/routes/update.js +435 -0
- package/console/dist/ui/App.js +2 -1
- package/console/dist/ui/components/UpdateBanner.d.ts +1 -0
- package/console/dist/ui/components/UpdateBanner.js +41 -0
- package/console/dist/ui/components/UpdateProgressDialog.d.ts +12 -0
- package/console/dist/ui/components/UpdateProgressDialog.js +28 -0
- package/console/dist/ui/i18n/en.json +0 -1
- package/console/dist/ui/i18n/zh-CN.json +0 -1
- package/console/dist/ui/pages/AgentsPage.js +3 -17
- package/console/dist/ui/pages/TasksPage.js +0 -1
- package/console/dist/ui/pages/UpdatePage.d.ts +1 -0
- package/console/dist/ui/pages/UpdatePage.js +142 -0
- package/console/dist/web/assets/app.css +7 -0
- package/console/dist/web/assets/app.js +456 -173
- package/console/package.json +2 -0
- package/core/dist/runtime-v2/adapter/__tests__/schema-prompt-adapter.test.d.ts +2 -0
- package/core/dist/runtime-v2/adapter/__tests__/schema-prompt-adapter.test.d.ts.map +1 -0
- package/core/dist/runtime-v2/adapter/__tests__/schema-prompt-adapter.test.js +270 -0
- package/core/dist/runtime-v2/adapter/__tests__/schema-prompt-adapter.test.js.map +1 -0
- package/core/dist/runtime-v2/adapter/pi-ai-runtime-adapter.d.ts +1 -1
- package/core/dist/runtime-v2/adapter/pi-ai-runtime-adapter.d.ts.map +1 -1
- package/core/dist/runtime-v2/adapter/pi-ai-runtime-adapter.js +4 -3
- package/core/dist/runtime-v2/adapter/pi-ai-runtime-adapter.js.map +1 -1
- package/core/dist/runtime-v2/adapter/schema-prompt-adapter.d.ts +13 -0
- package/core/dist/runtime-v2/adapter/schema-prompt-adapter.d.ts.map +1 -0
- package/core/dist/runtime-v2/adapter/schema-prompt-adapter.js +266 -0
- package/core/dist/runtime-v2/adapter/schema-prompt-adapter.js.map +1 -0
- package/core/dist/runtime-v2/adapter/tools/diagnostician-tool.d.ts +3 -7
- package/core/dist/runtime-v2/adapter/tools/diagnostician-tool.d.ts.map +1 -1
- package/core/dist/runtime-v2/adapter/tools/diagnostician-tool.js +7 -19
- package/core/dist/runtime-v2/adapter/tools/diagnostician-tool.js.map +1 -1
- package/core/dist/runtime-v2/diagnostician/__tests__/diagnostician-prompt-builder.test.js +97 -15
- package/core/dist/runtime-v2/diagnostician/__tests__/diagnostician-prompt-builder.test.js.map +1 -1
- package/core/dist/runtime-v2/diagnostician-output.d.ts +0 -10
- package/core/dist/runtime-v2/diagnostician-output.d.ts.map +1 -1
- package/core/dist/runtime-v2/diagnostician-output.js +5 -10
- package/core/dist/runtime-v2/diagnostician-output.js.map +1 -1
- package/core/dist/runtime-v2/diagnostician-prompt-builder.d.ts +6 -1
- package/core/dist/runtime-v2/diagnostician-prompt-builder.d.ts.map +1 -1
- package/core/dist/runtime-v2/diagnostician-prompt-builder.js +23 -15
- package/core/dist/runtime-v2/diagnostician-prompt-builder.js.map +1 -1
- package/dist/index.js +0 -0
- package/dist/installer.d.ts.map +1 -1
- package/dist/installer.js +67 -0
- package/dist/installer.js.map +1 -1
- package/dist/uninstaller.d.ts +0 -5
- package/dist/uninstaller.d.ts.map +1 -1
- package/dist/uninstaller.js +53 -8
- package/dist/uninstaller.js.map +1 -1
- package/dist/updater.d.ts +45 -0
- package/dist/updater.d.ts.map +1 -0
- package/dist/updater.js +333 -0
- package/dist/updater.js.map +1 -0
- package/dist/utils/env.d.ts +6 -0
- package/dist/utils/env.d.ts.map +1 -1
- package/dist/utils/env.js +54 -0
- package/dist/utils/env.js.map +1 -1
- package/package.json +6 -2
- package/pd-cli/dist/index.js +4 -1
- package/pd-cli/dist/index.js.map +1 -1
- package/pd-cli/package.json +2 -2
- package/plugin/templates/langs/en/skills/ai-sprint-orchestration/runtime/.gitignore +2 -2
- package/plugin/templates/langs/zh/skills/ai-sprint-orchestration/runtime/.gitignore +2 -2
- package/core/dist/runtime-v2/__tests__/nocturnal-compliance-trust-boundary.test.d.ts +0 -2
- package/core/dist/runtime-v2/__tests__/nocturnal-compliance-trust-boundary.test.d.ts.map +0 -1
- package/core/dist/runtime-v2/__tests__/nocturnal-compliance-trust-boundary.test.js +0 -215
- package/core/dist/runtime-v2/__tests__/nocturnal-compliance-trust-boundary.test.js.map +0 -1
- package/core/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-config-resolve.test.d.ts +0 -2
- package/core/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-config-resolve.test.d.ts.map +0 -1
- package/core/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-config-resolve.test.js +0 -92
- package/core/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-config-resolve.test.js.map +0 -1
- package/core/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-decision.test.d.ts +0 -2
- package/core/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-decision.test.d.ts.map +0 -1
- package/core/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-decision.test.js +0 -134
- package/core/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-decision.test.js.map +0 -1
- package/core/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-edge-cases.test.d.ts +0 -2
- package/core/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-edge-cases.test.d.ts.map +0 -1
- package/core/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-edge-cases.test.js +0 -226
- package/core/dist/runtime-v2/idle-trigger/__tests__/idle-trigger-edge-cases.test.js.map +0 -1
- package/core/dist/runtime-v2/idle-trigger/idle-trigger-decision.d.ts +0 -3
- package/core/dist/runtime-v2/idle-trigger/idle-trigger-decision.d.ts.map +0 -1
- package/core/dist/runtime-v2/idle-trigger/idle-trigger-decision.js +0 -5
- package/core/dist/runtime-v2/idle-trigger/idle-trigger-decision.js.map +0 -1
- package/core/dist/runtime-v2/idle-trigger/idle-trigger-policy.d.ts +0 -4
- package/core/dist/runtime-v2/idle-trigger/idle-trigger-policy.d.ts.map +0 -1
- package/core/dist/runtime-v2/idle-trigger/idle-trigger-policy.js +0 -81
- package/core/dist/runtime-v2/idle-trigger/idle-trigger-policy.js.map +0 -1
- package/core/dist/runtime-v2/idle-trigger/idle-trigger-types.d.ts +0 -29
- package/core/dist/runtime-v2/idle-trigger/idle-trigger-types.d.ts.map +0 -1
- package/core/dist/runtime-v2/idle-trigger/idle-trigger-types.js +0 -15
- package/core/dist/runtime-v2/idle-trigger/idle-trigger-types.js.map +0 -1
- package/core/dist/runtime-v2/idle-trigger/index.d.ts +0 -5
- package/core/dist/runtime-v2/idle-trigger/index.d.ts.map +0 -1
- package/core/dist/runtime-v2/idle-trigger/index.js +0 -4
- package/core/dist/runtime-v2/idle-trigger/index.js.map +0 -1
- package/core/dist/runtime-v2/nocturnal/candidate-scoring.d.ts +0 -486
- package/core/dist/runtime-v2/nocturnal/candidate-scoring.d.ts.map +0 -1
- package/core/dist/runtime-v2/nocturnal/candidate-scoring.js +0 -493
- package/core/dist/runtime-v2/nocturnal/candidate-scoring.js.map +0 -1
- package/core/dist/runtime-v2/nocturnal/index.d.ts +0 -9
- package/core/dist/runtime-v2/nocturnal/index.d.ts.map +0 -1
- package/core/dist/runtime-v2/nocturnal/index.js +0 -5
- package/core/dist/runtime-v2/nocturnal/index.js.map +0 -1
- package/core/dist/runtime-v2/nocturnal/nocturnal-compliance.d.ts +0 -185
- package/core/dist/runtime-v2/nocturnal/nocturnal-compliance.d.ts.map +0 -1
- package/core/dist/runtime-v2/nocturnal/nocturnal-compliance.js +0 -912
- package/core/dist/runtime-v2/nocturnal/nocturnal-compliance.js.map +0 -1
- package/core/dist/runtime-v2/nocturnal/snapshot-contract.d.ts +0 -192
- package/core/dist/runtime-v2/nocturnal/snapshot-contract.d.ts.map +0 -1
- package/core/dist/runtime-v2/nocturnal/snapshot-contract.js +0 -185
- package/core/dist/runtime-v2/nocturnal/snapshot-contract.js.map +0 -1
- package/core/dist/runtime-v2/nocturnal/trinity-types.d.ts +0 -421
- package/core/dist/runtime-v2/nocturnal/trinity-types.d.ts.map +0 -1
- package/core/dist/runtime-v2/nocturnal/trinity-types.js +0 -182
- package/core/dist/runtime-v2/nocturnal/trinity-types.js.map +0 -1
- package/pd-cli/dist/commands/runtime-idle-trigger.d.ts +0 -12
- package/pd-cli/dist/commands/runtime-idle-trigger.d.ts.map +0 -1
- package/pd-cli/dist/commands/runtime-idle-trigger.js +0 -102
- package/pd-cli/dist/commands/runtime-idle-trigger.js.map +0 -1
- package/plugin/dist/bundle.js +0 -2424
- package/plugin/dist/core/trajectory/index.js +0 -1804
- package/plugin/dist/openclaw.plugin.json +0 -65
- package/plugin/dist/templates/langs/en/core/AGENTS.md +0 -205
- package/plugin/dist/templates/langs/en/core/BOOT.md +0 -60
- package/plugin/dist/templates/langs/en/core/BOOTSTRAP.md +0 -273
- package/plugin/dist/templates/langs/en/core/HEARTBEAT.md +0 -74
- package/plugin/dist/templates/langs/en/core/IDENTITY.md +0 -8
- package/plugin/dist/templates/langs/en/core/PRINCIPLES.md +0 -10
- package/plugin/dist/templates/langs/en/core/SOUL.md +0 -46
- package/plugin/dist/templates/langs/en/core/TOOLS.md +0 -15
- package/plugin/dist/templates/langs/en/core/USER.md +0 -10
- package/plugin/dist/templates/langs/en/pain/00_seed_samples.md +0 -23
- package/plugin/dist/templates/langs/en/pain_dictionary.json +0 -22
- package/plugin/dist/templates/langs/en/principles/THINKING_OS.md +0 -64
- package/plugin/dist/templates/langs/en/skills/admin/SKILL.md +0 -39
- package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/EXAMPLES.md +0 -63
- package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/REFERENCE.md +0 -136
- package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/SKILL.md +0 -67
- package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/references/agent-registry.json +0 -143
- package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/references/specs/bugfix-complex-template.json +0 -107
- package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/references/specs/feature-complex-template.json +0 -107
- package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/references/specs/workflow-validation-minimal-verify.json +0 -95
- package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/references/specs/workflow-validation-minimal.json +0 -98
- package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/references/workflow-v1-acceptance-checklist.md +0 -58
- package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/references/workflow-v1.4-work-unit-handoff.md +0 -190
- package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/runtime/.gitignore +0 -2
- package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/scripts/lib/archive.mjs +0 -310
- package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/scripts/lib/contract-enforcement.mjs +0 -683
- package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/scripts/lib/decision.mjs +0 -604
- package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/scripts/lib/state-store.mjs +0 -32
- package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/scripts/lib/task-specs.mjs +0 -707
- package/plugin/dist/templates/langs/en/skills/ai-sprint-orchestration/scripts/run.mjs +0 -3455
- package/plugin/dist/templates/langs/en/skills/bootstrap-tools/SKILL.md +0 -53
- package/plugin/dist/templates/langs/en/skills/deductive-audit/SKILL.md +0 -36
- package/plugin/dist/templates/langs/en/skills/evolution-framework-update/SKILL.md +0 -31
- package/plugin/dist/templates/langs/en/skills/evolve-system/SKILL.md +0 -46
- package/plugin/dist/templates/langs/en/skills/evolve-task/SKILL.md +0 -83
- package/plugin/dist/templates/langs/en/skills/feedback/SKILL.md +0 -51
- package/plugin/dist/templates/langs/en/skills/init-strategy/SKILL.md +0 -54
- package/plugin/dist/templates/langs/en/skills/inject-rule/SKILL.md +0 -19
- package/plugin/dist/templates/langs/en/skills/manage-okr/SKILL.md +0 -96
- package/plugin/dist/templates/langs/en/skills/pd-auditor/SKILL.md +0 -61
- package/plugin/dist/templates/langs/en/skills/pd-cli-operator/SKILL.md +0 -67
- package/plugin/dist/templates/langs/en/skills/pd-daily/SKILL.md +0 -199
- package/plugin/dist/templates/langs/en/skills/pd-diagnostician/SKILL.md +0 -466
- package/plugin/dist/templates/langs/en/skills/pd-explorer/SKILL.md +0 -65
- package/plugin/dist/templates/langs/en/skills/pd-grooming/SKILL.md +0 -46
- package/plugin/dist/templates/langs/en/skills/pd-implementer/SKILL.md +0 -68
- package/plugin/dist/templates/langs/en/skills/pd-mentor/SKILL.md +0 -230
- package/plugin/dist/templates/langs/en/skills/pd-pain-signal/SKILL.md +0 -30
- package/plugin/dist/templates/langs/en/skills/pd-planner/SKILL.md +0 -65
- package/plugin/dist/templates/langs/en/skills/pd-runtime-v2/SKILL.md +0 -61
- package/plugin/dist/templates/langs/en/skills/plan-script/SKILL.md +0 -32
- package/plugin/dist/templates/langs/en/skills/profile/SKILL.md +0 -24
- package/plugin/dist/templates/langs/en/skills/reflection/SKILL.md +0 -40
- package/plugin/dist/templates/langs/en/skills/reflection-log/SKILL.md +0 -37
- package/plugin/dist/templates/langs/en/skills/report/SKILL.md +0 -13
- package/plugin/dist/templates/langs/en/skills/root-cause/SKILL.md +0 -33
- package/plugin/dist/templates/langs/en/skills/triage/SKILL.md +0 -29
- package/plugin/dist/templates/langs/en/skills/watch-evolution/SKILL.md +0 -33
- package/plugin/dist/templates/langs/zh/core/AGENTS.md +0 -197
- package/plugin/dist/templates/langs/zh/core/BOOT.md +0 -60
- package/plugin/dist/templates/langs/zh/core/BOOTSTRAP.md +0 -273
- package/plugin/dist/templates/langs/zh/core/HEARTBEAT.md +0 -98
- package/plugin/dist/templates/langs/zh/core/IDENTITY.md +0 -8
- package/plugin/dist/templates/langs/zh/core/PRINCIPLES.md +0 -7
- package/plugin/dist/templates/langs/zh/core/SOUL.md +0 -46
- package/plugin/dist/templates/langs/zh/core/TOOLS.md +0 -15
- package/plugin/dist/templates/langs/zh/core/USER.md +0 -10
- package/plugin/dist/templates/langs/zh/pain/00_seed_samples.md +0 -24
- package/plugin/dist/templates/langs/zh/pain_dictionary.json +0 -18
- package/plugin/dist/templates/langs/zh/principles/THINKING_OS.md +0 -64
- package/plugin/dist/templates/langs/zh/skills/admin/SKILL.md +0 -41
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/EXAMPLES.md +0 -63
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/REFERENCE.md +0 -136
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/SKILL.md +0 -67
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/references/agent-registry.json +0 -143
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/references/specs/bugfix-complex-template.json +0 -107
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/references/specs/feature-complex-template.json +0 -107
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/references/specs/nocturnal-trinity-quality-enhancement.json +0 -111
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/references/specs/workflow-validation-minimal-verify.json +0 -95
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/references/specs/workflow-validation-minimal.json +0 -98
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/references/workflow-v1-acceptance-checklist.md +0 -58
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/references/workflow-v1.4-work-unit-handoff.md +0 -190
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/runtime/.gitignore +0 -2
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/scripts/lib/archive.mjs +0 -310
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/scripts/lib/contract-enforcement.mjs +0 -683
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/scripts/lib/decision.mjs +0 -604
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/scripts/lib/state-store.mjs +0 -32
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/scripts/lib/task-specs.mjs +0 -707
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/scripts/run.mjs +0 -3455
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/test/archive.test.mjs +0 -230
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/test/contract-enforcement.test.mjs +0 -672
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/test/decision.test.mjs +0 -1321
- package/plugin/dist/templates/langs/zh/skills/ai-sprint-orchestration/test/run.test.mjs +0 -1435
- package/plugin/dist/templates/langs/zh/skills/bootstrap-tools/SKILL.md +0 -52
- package/plugin/dist/templates/langs/zh/skills/deductive-audit/SKILL.md +0 -36
- package/plugin/dist/templates/langs/zh/skills/evolution-framework-update/SKILL.md +0 -31
- package/plugin/dist/templates/langs/zh/skills/evolve-system/SKILL.md +0 -46
- package/plugin/dist/templates/langs/zh/skills/evolve-task/SKILL.md +0 -83
- package/plugin/dist/templates/langs/zh/skills/feedback/SKILL.md +0 -53
- package/plugin/dist/templates/langs/zh/skills/init-strategy/SKILL.md +0 -54
- package/plugin/dist/templates/langs/zh/skills/inject-rule/SKILL.md +0 -19
- package/plugin/dist/templates/langs/zh/skills/manage-okr/SKILL.md +0 -109
- package/plugin/dist/templates/langs/zh/skills/pd-auditor/SKILL.md +0 -61
- package/plugin/dist/templates/langs/zh/skills/pd-cli-operator/SKILL.md +0 -67
- package/plugin/dist/templates/langs/zh/skills/pd-daily/SKILL.md +0 -283
- package/plugin/dist/templates/langs/zh/skills/pd-diagnostician/SKILL.md +0 -391
- package/plugin/dist/templates/langs/zh/skills/pd-explorer/SKILL.md +0 -65
- package/plugin/dist/templates/langs/zh/skills/pd-grooming/SKILL.md +0 -46
- package/plugin/dist/templates/langs/zh/skills/pd-implementer/SKILL.md +0 -68
- package/plugin/dist/templates/langs/zh/skills/pd-mentor/SKILL.md +0 -230
- package/plugin/dist/templates/langs/zh/skills/pd-pain-signal/SKILL.md +0 -30
- package/plugin/dist/templates/langs/zh/skills/pd-planner/SKILL.md +0 -65
- package/plugin/dist/templates/langs/zh/skills/pd-runtime-v2/SKILL.md +0 -61
- package/plugin/dist/templates/langs/zh/skills/plan-script/SKILL.md +0 -32
- package/plugin/dist/templates/langs/zh/skills/profile/SKILL.md +0 -24
- package/plugin/dist/templates/langs/zh/skills/reflection/SKILL.md +0 -40
- package/plugin/dist/templates/langs/zh/skills/reflection-log/SKILL.md +0 -37
- package/plugin/dist/templates/langs/zh/skills/report/SKILL.md +0 -13
- package/plugin/dist/templates/langs/zh/skills/root-cause/SKILL.md +0 -33
- package/plugin/dist/templates/langs/zh/skills/triage/SKILL.md +0 -29
- package/plugin/dist/templates/langs/zh/skills/watch-evolution/SKILL.md +0 -33
- package/plugin/dist/templates/pain_dictionary.json +0 -36
- package/plugin/dist/templates/pain_settings.json +0 -103
- package/plugin/dist/templates/workspace/.principles/DECISION_POLICY.json +0 -44
- package/plugin/dist/templates/workspace/.principles/PRINCIPLES.md +0 -20
- package/plugin/dist/templates/workspace/.principles/PROFILE.json +0 -54
- package/plugin/dist/templates/workspace/.principles/PROFILE.schema.json +0 -56
- package/plugin/dist/templates/workspace/.principles/THINKING_OS.md +0 -64
- package/plugin/dist/templates/workspace/.principles/THINKING_OS_ARCHIVE.md +0 -7
- package/plugin/dist/templates/workspace/.principles/THINKING_OS_CANDIDATES.md +0 -9
- package/plugin/dist/templates/workspace/.principles/models/_INDEX.md +0 -27
- package/plugin/dist/templates/workspace/.principles/models/first_principles.md +0 -62
- package/plugin/dist/templates/workspace/.principles/models/marketing_4p.md +0 -52
- package/plugin/dist/templates/workspace/.principles/models/porter_five.md +0 -63
- package/plugin/dist/templates/workspace/.principles/models/swot.md +0 -60
- package/plugin/dist/templates/workspace/.principles/models/user_story_map.md +0 -63
- package/plugin/dist/templates/workspace/.state/WORKBOARD.json +0 -4
- package/plugin/dist/templates/workspace/AUDIT.md +0 -15
- package/plugin/dist/templates/workspace/PLAN.md +0 -2
- package/plugin/dist/templates/workspace/okr/CURRENT_FOCUS.md +0 -57
- package/plugin/dist/templates/workspace/okr/RECOVERY_PROTOCOL.md +0 -56
- package/plugin/dist/templates/workspace/okr/TASK_CHANGES.jsonl +0 -6
- package/plugin/dist/templates/workspace/okr/WEEK_TASKS.json +0 -6
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
interface IdleTriggerEvaluateOptions {
|
|
2
|
-
workspace?: string;
|
|
3
|
-
json?: boolean;
|
|
4
|
-
enabled?: boolean;
|
|
5
|
-
idleThresholdMs?: number;
|
|
6
|
-
jitterMaxMs?: number;
|
|
7
|
-
activityCooldownMs?: number;
|
|
8
|
-
jitterSeed?: string;
|
|
9
|
-
}
|
|
10
|
-
export declare function handleRuntimeIdleTriggerEvaluate(opts: IdleTriggerEvaluateOptions): Promise<void>;
|
|
11
|
-
export {};
|
|
12
|
-
//# sourceMappingURL=runtime-idle-trigger.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-idle-trigger.d.ts","sourceRoot":"","sources":["../../src/commands/runtime-idle-trigger.ts"],"names":[],"mappings":"AAUA,UAAU,0BAA0B;IAClC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAmCD,wBAAsB,gCAAgC,CAAC,IAAI,EAAE,0BAA0B,GAAG,OAAO,CAAC,IAAI,CAAC,CAmEtG"}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
import * as path from 'path';
|
|
2
|
-
import { RuntimeStateManager, InternalizationQueueReadModel, evaluateIdleTriggerDecision, resolveIdleTriggerConfig, } from '@principles/core/runtime-v2';
|
|
3
|
-
import { resolveWorkspaceDir } from '../resolve-workspace.js';
|
|
4
|
-
function formatTextOutput(result) {
|
|
5
|
-
const lines = [];
|
|
6
|
-
lines.push(`IdleTrigger: ${result.decision}`);
|
|
7
|
-
lines.push(` reason: ${result.reason}`);
|
|
8
|
-
lines.push(` idleForMs: ${result.idleForMs}`);
|
|
9
|
-
lines.push(` jitterMs: ${result.jitterMs}`);
|
|
10
|
-
lines.push(` nextEligibleAt: ${result.nextEligibleAt}`);
|
|
11
|
-
lines.push(` queue: ready=${result.queue.readyCount} pending=${result.queue.pendingCount} retryWait=${result.queue.retryWaitCount}`);
|
|
12
|
-
return lines.join('\n');
|
|
13
|
-
}
|
|
14
|
-
function isValidPositiveInt(value) {
|
|
15
|
-
return value !== undefined && Number.isFinite(value) && value > 0;
|
|
16
|
-
}
|
|
17
|
-
async function findLastActivityAt(stateManager) {
|
|
18
|
-
try {
|
|
19
|
-
const tasks = await stateManager.listTasks({});
|
|
20
|
-
if (tasks.length === 0)
|
|
21
|
-
return { ts: null, error: null };
|
|
22
|
-
let latest = null;
|
|
23
|
-
for (const task of tasks) {
|
|
24
|
-
const ts = task.updatedAt ?? task.createdAt;
|
|
25
|
-
if (ts && (!latest || ts > latest)) {
|
|
26
|
-
latest = ts;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
return { ts: latest, error: null };
|
|
30
|
-
}
|
|
31
|
-
catch (err) {
|
|
32
|
-
const msg = err instanceof Error ? err.message : String(err);
|
|
33
|
-
return { ts: null, error: msg };
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
export async function handleRuntimeIdleTriggerEvaluate(opts) {
|
|
37
|
-
const workspaceDir = opts.workspace ? path.resolve(opts.workspace) : resolveWorkspaceDir();
|
|
38
|
-
const configOverrides = {};
|
|
39
|
-
if (opts.enabled !== undefined)
|
|
40
|
-
configOverrides.enabled = opts.enabled;
|
|
41
|
-
if (isValidPositiveInt(opts.idleThresholdMs))
|
|
42
|
-
configOverrides.idleThresholdMs = opts.idleThresholdMs;
|
|
43
|
-
if (isValidPositiveInt(opts.jitterMaxMs))
|
|
44
|
-
configOverrides.jitterMaxMs = opts.jitterMaxMs;
|
|
45
|
-
if (isValidPositiveInt(opts.activityCooldownMs))
|
|
46
|
-
configOverrides.activityCooldownMs = opts.activityCooldownMs;
|
|
47
|
-
const config = resolveIdleTriggerConfig(configOverrides);
|
|
48
|
-
const jitterSeed = opts.jitterSeed ?? `idle-trigger-${Date.now()}`;
|
|
49
|
-
const stateManager = new RuntimeStateManager({ workspaceDir });
|
|
50
|
-
await stateManager.initialize();
|
|
51
|
-
try {
|
|
52
|
-
const queueReadModel = new InternalizationQueueReadModel(stateManager);
|
|
53
|
-
const snapshot = await queueReadModel.getSnapshot();
|
|
54
|
-
const { ts: lastActivityAt, error: activityError } = await findLastActivityAt(stateManager);
|
|
55
|
-
if (activityError) {
|
|
56
|
-
const result = {
|
|
57
|
-
decision: 'skip',
|
|
58
|
-
reason: `activity_read_failed: ${activityError}`,
|
|
59
|
-
idleForMs: 0,
|
|
60
|
-
jitterMs: 0,
|
|
61
|
-
nextEligibleAt: new Date().toISOString(),
|
|
62
|
-
queue: {
|
|
63
|
-
readyCount: snapshot.readyTasks.length,
|
|
64
|
-
pendingCount: snapshot.pendingCount,
|
|
65
|
-
retryWaitCount: snapshot.retryWaitCount,
|
|
66
|
-
},
|
|
67
|
-
};
|
|
68
|
-
if (opts.json) {
|
|
69
|
-
console.log(JSON.stringify(result, null, 2));
|
|
70
|
-
}
|
|
71
|
-
else {
|
|
72
|
-
console.log(formatTextOutput(result));
|
|
73
|
-
}
|
|
74
|
-
process.exitCode = 1;
|
|
75
|
-
return;
|
|
76
|
-
}
|
|
77
|
-
const result = evaluateIdleTriggerDecision({
|
|
78
|
-
lastActivityAt,
|
|
79
|
-
queue: {
|
|
80
|
-
readyCount: snapshot.readyTasks.length,
|
|
81
|
-
pendingCount: snapshot.pendingCount,
|
|
82
|
-
retryWaitCount: snapshot.retryWaitCount,
|
|
83
|
-
},
|
|
84
|
-
config,
|
|
85
|
-
jitterSeed,
|
|
86
|
-
now: new Date().toISOString(),
|
|
87
|
-
});
|
|
88
|
-
if (opts.json) {
|
|
89
|
-
console.log(JSON.stringify(result, null, 2));
|
|
90
|
-
}
|
|
91
|
-
else {
|
|
92
|
-
console.log(formatTextOutput(result));
|
|
93
|
-
}
|
|
94
|
-
if (result.decision === 'skip') {
|
|
95
|
-
process.exitCode = 1;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
finally {
|
|
99
|
-
await stateManager.close();
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
//# sourceMappingURL=runtime-idle-trigger.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runtime-idle-trigger.js","sourceRoot":"","sources":["../../src/commands/runtime-idle-trigger.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EACL,mBAAmB,EACnB,6BAA6B,EAC7B,2BAA2B,EAC3B,wBAAwB,GACzB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAY9D,SAAS,gBAAgB,CAAC,MAAyB;IACjD,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,CAAC,IAAI,CAAC,gBAAgB,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;IAC9C,KAAK,CAAC,IAAI,CAAC,aAAa,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC;IACzC,KAAK,CAAC,IAAI,CAAC,gBAAgB,MAAM,CAAC,SAAS,EAAE,CAAC,CAAC;IAC/C,KAAK,CAAC,IAAI,CAAC,eA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