oh-my-copilot 5.19.2 → 5.19.4
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/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +70 -67
- package/agents/planner.md +4 -4
- package/bin/oh-my-copilot.js +5 -1
- package/bridge/claude-md-coordinator.cjs +2 -2
- package/bridge/cli.cjs +3043 -2635
- package/bridge/mcp-server.cjs +969 -867
- package/bridge/runtime-cli.cjs +244 -184
- package/bridge/team-bridge.cjs +17 -1
- package/bridge/team-mcp.cjs +208 -140
- package/bridge/team.js +73 -13
- package/copilot/agents/planner.md +4 -4
- package/dist/__tests__/ci-evidence.test.d.ts +2 -0
- package/dist/__tests__/ci-evidence.test.d.ts.map +1 -0
- package/dist/__tests__/ci-evidence.test.js +210 -0
- package/dist/__tests__/ci-evidence.test.js.map +1 -0
- package/dist/__tests__/copilot-hooks-manifest.test.js +1 -0
- package/dist/__tests__/copilot-hooks-manifest.test.js.map +1 -1
- package/dist/__tests__/doctor-conflicts.test.js +6 -5
- package/dist/__tests__/doctor-conflicts.test.js.map +1 -1
- package/dist/__tests__/hud/cli-diagnostic.test.js +4 -3
- package/dist/__tests__/hud/cli-diagnostic.test.js.map +1 -1
- package/dist/__tests__/mnemosyne/detector.test.js +3 -2
- package/dist/__tests__/mnemosyne/detector.test.js.map +1 -1
- package/dist/__tests__/run-cjs-windows-stdio-contract.test.js +50 -10
- package/dist/__tests__/run-cjs-windows-stdio-contract.test.js.map +1 -1
- package/dist/__tests__/session-end-process-exit.test.js +15 -5
- package/dist/__tests__/session-end-process-exit.test.js.map +1 -1
- package/dist/__tests__/session-start-script-context.test.js +1 -1
- package/dist/__tests__/session-start-script-context.test.js.map +1 -1
- package/dist/__tests__/setup/stub-skill-list-probe.d.ts +2 -0
- package/dist/__tests__/setup/stub-skill-list-probe.d.ts.map +1 -0
- package/dist/__tests__/setup/stub-skill-list-probe.js +11 -0
- package/dist/__tests__/setup/stub-skill-list-probe.js.map +1 -0
- package/dist/__tests__/setup-claude-md-script.test.js +7 -4
- package/dist/__tests__/setup-claude-md-script.test.js.map +1 -1
- package/dist/__tests__/setup-config-script.test.d.ts +2 -0
- package/dist/__tests__/setup-config-script.test.d.ts.map +1 -0
- package/dist/__tests__/setup-config-script.test.js +350 -0
- package/dist/__tests__/setup-config-script.test.js.map +1 -0
- package/dist/__tests__/shipyard-seed-locale.test.js +1 -1
- package/dist/__tests__/shipyard-seed-locale.test.js.map +1 -1
- package/dist/__tests__/shipyard-skills.test.js +9 -9
- package/dist/__tests__/shipyard-skills.test.js.map +1 -1
- package/dist/__tests__/tier0-docs-consistency.test.js +5 -5
- package/dist/__tests__/tier0-docs-consistency.test.js.map +1 -1
- package/dist/__tests__/trusted-publishing-contract.test.js +56 -7
- package/dist/__tests__/trusted-publishing-contract.test.js.map +1 -1
- package/dist/__tests__/visual-verdict-skill.test.js +1 -1
- package/dist/__tests__/visual-verdict-skill.test.js.map +1 -1
- package/dist/cli/__tests__/autoresearch.test.js +3 -2
- package/dist/cli/__tests__/autoresearch.test.js.map +1 -1
- package/dist/cli/autoresearch.d.ts +1 -1
- package/dist/cli/autoresearch.d.ts.map +1 -1
- package/dist/cli/autoresearch.js +2 -1
- package/dist/cli/autoresearch.js.map +1 -1
- package/dist/cli/commands/__tests__/factory-init.test.js +2 -1
- package/dist/cli/commands/__tests__/factory-init.test.js.map +1 -1
- package/dist/cli/commands/__tests__/intake.test.js +26 -4
- package/dist/cli/commands/__tests__/intake.test.js.map +1 -1
- package/dist/cli/commands/doctor-conflicts.d.ts.map +1 -1
- package/dist/cli/commands/doctor-conflicts.js +5 -4
- package/dist/cli/commands/doctor-conflicts.js.map +1 -1
- package/dist/cli/commands/factory.d.ts.map +1 -1
- package/dist/cli/commands/factory.js +4 -3
- package/dist/cli/commands/factory.js.map +1 -1
- package/dist/cli/commands/intake.d.ts.map +1 -1
- package/dist/cli/commands/intake.js +13 -4
- package/dist/cli/commands/intake.js.map +1 -1
- package/dist/cli/commands/release.d.ts.map +1 -1
- package/dist/cli/commands/release.js +11 -2
- package/dist/cli/commands/release.js.map +1 -1
- package/dist/cli/commands/ship.d.ts +1 -1
- package/dist/cli/commands/ship.js +1 -1
- package/dist/copilot-run/job.d.ts.map +1 -1
- package/dist/copilot-run/job.js +4 -1
- package/dist/copilot-run/job.js.map +1 -1
- package/dist/copilot-run/sandbox.d.ts +2 -7
- package/dist/copilot-run/sandbox.d.ts.map +1 -1
- package/dist/copilot-run/sandbox.js +2 -26
- package/dist/copilot-run/sandbox.js.map +1 -1
- package/dist/factory/__tests__/listener.test.js +22 -4
- package/dist/factory/__tests__/listener.test.js.map +1 -1
- package/dist/factory/listener.d.ts +2 -2
- package/dist/factory/listener.d.ts.map +1 -1
- package/dist/factory/listener.js +20 -5
- package/dist/factory/listener.js.map +1 -1
- package/dist/factory/run/__tests__/prepare-gates.test.js +7 -1
- package/dist/factory/run/__tests__/prepare-gates.test.js.map +1 -1
- package/dist/factory/run/engine.d.ts.map +1 -1
- package/dist/factory/run/engine.js +1 -0
- package/dist/factory/run/engine.js.map +1 -1
- package/dist/features/continuation-enforcement.d.ts.map +1 -1
- package/dist/features/continuation-enforcement.js +2 -1
- package/dist/features/continuation-enforcement.js.map +1 -1
- package/dist/features/lookout/__tests__/lookout.test.js +9 -6
- package/dist/features/lookout/__tests__/lookout.test.js.map +1 -1
- package/dist/forge/__tests__/gh-argv-baseline.factory.test.js +7 -1
- package/dist/forge/__tests__/gh-argv-baseline.factory.test.js.map +1 -1
- package/dist/hooks/__tests__/bridge.test.js +10 -2
- package/dist/hooks/__tests__/bridge.test.js.map +1 -1
- package/dist/hooks/autopilot/__tests__/pipeline.test.js +2 -1
- package/dist/hooks/autopilot/__tests__/pipeline.test.js.map +1 -1
- package/dist/hooks/autopilot/adapters/execution-adapter.d.ts.map +1 -1
- package/dist/hooks/autopilot/adapters/execution-adapter.js +3 -2
- package/dist/hooks/autopilot/adapters/execution-adapter.js.map +1 -1
- package/dist/hooks/autopilot/adapters/ralplan-adapter.d.ts.map +1 -1
- package/dist/hooks/autopilot/adapters/ralplan-adapter.js +2 -1
- package/dist/hooks/autopilot/adapters/ralplan-adapter.js.map +1 -1
- package/dist/hooks/learner/detector.d.ts.map +1 -1
- package/dist/hooks/learner/detector.js +2 -6
- package/dist/hooks/learner/detector.js.map +1 -1
- package/dist/hooks/mode-registry/index.d.ts.map +1 -1
- package/dist/hooks/mode-registry/index.js +2 -1
- package/dist/hooks/mode-registry/index.js.map +1 -1
- package/dist/hooks/persistent-mode/__tests__/team-ralplan-stop.test.js +7 -0
- package/dist/hooks/persistent-mode/__tests__/team-ralplan-stop.test.js.map +1 -1
- package/dist/hooks/persistent-mode/index.d.ts +1 -1
- package/dist/hooks/persistent-mode/index.d.ts.map +1 -1
- package/dist/hooks/persistent-mode/index.js +6 -5
- package/dist/hooks/persistent-mode/index.js.map +1 -1
- package/dist/hooks/persistent-mode/session-isolation.test.js +23 -14
- package/dist/hooks/persistent-mode/session-isolation.test.js.map +1 -1
- package/dist/hooks/ralph/loop.d.ts +1 -1
- package/dist/hooks/ralph/loop.js +1 -1
- package/dist/hooks/ralph/prd.d.ts.map +1 -1
- package/dist/hooks/ralph/prd.js +2 -1
- package/dist/hooks/ralph/prd.js.map +1 -1
- package/dist/hooks/ralph/stale-prd.d.ts +2 -2
- package/dist/hooks/ralph/stale-prd.js +3 -3
- package/dist/hooks/ralph/stale-prd.js.map +1 -1
- package/dist/hooks/ralph/verifier.d.ts +1 -1
- package/dist/hooks/ralph/verifier.d.ts.map +1 -1
- package/dist/hooks/ralph/verifier.js +4 -3
- package/dist/hooks/ralph/verifier.js.map +1 -1
- package/dist/hooks/session-end/__tests__/spawn-next.test.js +31 -4
- package/dist/hooks/session-end/__tests__/spawn-next.test.js.map +1 -1
- package/dist/hooks/session-end/spawn-next.d.ts +6 -3
- package/dist/hooks/session-end/spawn-next.d.ts.map +1 -1
- package/dist/hooks/session-end/spawn-next.js +19 -6
- package/dist/hooks/session-end/spawn-next.js.map +1 -1
- package/dist/hud/index.d.ts.map +1 -1
- package/dist/hud/index.js +3 -2
- package/dist/hud/index.js.map +1 -1
- package/dist/installer/__tests__/hook-templates.test.js +3 -1
- package/dist/installer/__tests__/hook-templates.test.js.map +1 -1
- package/dist/installer/__tests__/session-start-template.test.js +16 -8
- package/dist/installer/__tests__/session-start-template.test.js.map +1 -1
- package/dist/installer/hooks.d.ts +1 -1
- package/dist/installer/hooks.d.ts.map +1 -1
- package/dist/installer/hooks.js +2 -1
- package/dist/installer/hooks.js.map +1 -1
- package/dist/release/__tests__/checks.test.js +39 -1
- package/dist/release/__tests__/checks.test.js.map +1 -1
- package/dist/release/__tests__/engine.test.js +236 -3
- package/dist/release/__tests__/engine.test.js.map +1 -1
- package/dist/release/checks.d.ts +18 -1
- package/dist/release/checks.d.ts.map +1 -1
- package/dist/release/checks.js +40 -1
- package/dist/release/checks.js.map +1 -1
- package/dist/release/engine.d.ts +14 -2
- package/dist/release/engine.d.ts.map +1 -1
- package/dist/release/engine.js +211 -44
- package/dist/release/engine.js.map +1 -1
- package/dist/ship/__tests__/exec-env.test.d.ts +2 -0
- package/dist/ship/__tests__/exec-env.test.d.ts.map +1 -0
- package/dist/ship/__tests__/exec-env.test.js +26 -0
- package/dist/ship/__tests__/exec-env.test.js.map +1 -0
- package/dist/ship/__tests__/exec-plant.test.d.ts +2 -0
- package/dist/ship/__tests__/exec-plant.test.d.ts.map +1 -0
- package/dist/ship/__tests__/exec-plant.test.js +34 -0
- package/dist/ship/__tests__/exec-plant.test.js.map +1 -0
- package/dist/ship/__tests__/gates.test.js +35 -0
- package/dist/ship/__tests__/gates.test.js.map +1 -1
- package/dist/ship/__tests__/workflow-checks.test.js +34 -5
- package/dist/ship/__tests__/workflow-checks.test.js.map +1 -1
- package/dist/ship/config.js +3 -3
- package/dist/ship/config.js.map +1 -1
- package/dist/ship/exec.d.ts.map +1 -1
- package/dist/ship/exec.js +10 -2
- package/dist/ship/exec.js.map +1 -1
- package/dist/ship/gates.d.ts.map +1 -1
- package/dist/ship/gates.js +3 -1
- package/dist/ship/gates.js.map +1 -1
- package/dist/skills/__tests__/mingw-escape.test.js +0 -35
- package/dist/skills/__tests__/mingw-escape.test.js.map +1 -1
- package/dist/skills/__tests__/omc-setup-optout.test.js +4 -3
- package/dist/skills/__tests__/omc-setup-optout.test.js.map +1 -1
- package/dist/smoke/__tests__/copilot-factory-run-scenario.test.js +7 -1
- package/dist/smoke/__tests__/copilot-factory-run-scenario.test.js.map +1 -1
- package/dist/smoke/__tests__/copilot-sdk-driver.test.js +2 -2
- package/dist/smoke/__tests__/copilot-sdk-driver.test.js.map +1 -1
- package/dist/smoke/copilot-sdk-scenarios.d.ts.map +1 -1
- package/dist/smoke/copilot-sdk-scenarios.js +2 -1
- package/dist/smoke/copilot-sdk-scenarios.js.map +1 -1
- package/dist/team/__tests__/git-worktree.test.js +10 -1
- package/dist/team/__tests__/git-worktree.test.js.map +1 -1
- package/dist/team/__tests__/runtime-cli.test.js +4 -4
- package/dist/team/__tests__/runtime-cli.test.js.map +1 -1
- package/dist/team/__tests__/tmux-session.test.js +16 -2
- package/dist/team/__tests__/tmux-session.test.js.map +1 -1
- package/dist/team/__tests__/worker-launch-ack.test.js +14 -0
- package/dist/team/__tests__/worker-launch-ack.test.js.map +1 -1
- package/dist/team/git-worktree.d.ts.map +1 -1
- package/dist/team/git-worktree.js +13 -5
- package/dist/team/git-worktree.js.map +1 -1
- package/dist/team/tmux-session.d.ts.map +1 -1
- package/dist/team/tmux-session.js +8 -6
- package/dist/team/tmux-session.js.map +1 -1
- package/dist/ultragoal/goal-record.d.ts.map +1 -1
- package/dist/ultragoal/goal-record.js +2 -1
- package/dist/ultragoal/goal-record.js.map +1 -1
- package/dist/utils/__tests__/skill-slash.test.d.ts +2 -0
- package/dist/utils/__tests__/skill-slash.test.d.ts.map +1 -0
- package/dist/utils/__tests__/skill-slash.test.js +307 -0
- package/dist/utils/__tests__/skill-slash.test.js.map +1 -0
- package/dist/utils/__tests__/windows-search.test.d.ts +2 -0
- package/dist/utils/__tests__/windows-search.test.d.ts.map +1 -0
- package/dist/utils/__tests__/windows-search.test.js +154 -0
- package/dist/utils/__tests__/windows-search.test.js.map +1 -0
- package/dist/utils/skill-registry.d.ts +51 -0
- package/dist/utils/skill-registry.d.ts.map +1 -0
- package/dist/utils/skill-registry.js +168 -0
- package/dist/utils/skill-registry.js.map +1 -0
- package/dist/utils/skill-slash.d.ts +18 -0
- package/dist/utils/skill-slash.d.ts.map +1 -0
- package/dist/utils/skill-slash.js +20 -0
- package/dist/utils/skill-slash.js.map +1 -0
- package/dist/utils/windows-search.d.ts +42 -0
- package/dist/utils/windows-search.d.ts.map +1 -0
- package/dist/utils/windows-search.js +94 -0
- package/dist/utils/windows-search.js.map +1 -0
- package/docs/ARCHITECTURE.md +29 -29
- package/docs/CLAUDE.md +4 -4
- package/docs/FIELD-TESTING.md +563 -0
- package/docs/GETTING-STARTED.md +11 -11
- package/docs/HOOKS.md +8 -8
- package/docs/MIGRATION.md +100 -100
- package/docs/PERFORMANCE-MONITORING.md +2 -2
- package/docs/REFERENCE.md +131 -131
- package/docs/TOOLS.md +1 -1
- package/docs/cancel-skill-active-state-gap.md +2 -2
- package/docs/copilot-instructions.md +3 -3
- package/docs/design/P2-RUN-LEDGER-AND-INTAKE-PLAN.md +1 -1
- package/docs/design/project-session-manager.md +1 -1
- package/docs/field-testing-first-prompt.md +36 -0
- package/docs/shared/features.md +5 -5
- package/docs/shipyard.md +8 -8
- package/package.json +2 -2
- package/plugin.json +1 -1
- package/scripts/build-workflow-stage-prompts.mjs +15 -6
- package/scripts/ci/duration-sequencer.mjs +69 -0
- package/scripts/ci/durations-reporter.mjs +34 -0
- package/scripts/ci/tree-reuse.mjs +166 -0
- package/scripts/ci/update-test-durations.mjs +62 -0
- package/scripts/copilot/dispatch.cjs +3 -0
- package/scripts/find-node.sh +1 -1
- package/scripts/keyword-detector.mjs +5 -4
- package/scripts/lib/copilot-hook-adapter.cjs +3 -0
- package/scripts/lib/hud-wrapper-template.txt +2 -2
- package/scripts/lib/skill-slash.mjs +11 -0
- package/scripts/lib/windows-search.cjs +40 -0
- package/scripts/lib/windows-search.mjs +7 -0
- package/scripts/lib/workflow-stage-prompts.mjs +6 -2
- package/scripts/persistent-mode.cjs +11 -10
- package/scripts/persistent-mode.mjs +16 -11
- package/scripts/plugin-shipping-surface.mjs +1 -0
- package/scripts/pre-tool-enforcer.mjs +1 -1
- package/scripts/session-start.mjs +3 -3
- package/scripts/setup-claude-md.mjs +3 -0
- package/scripts/setup-config.mjs +420 -0
- package/scripts/setup-progress.mjs +3 -0
- package/scripts/shipyard-audit.mjs +2 -1
- package/scripts/stale-run-reporter.mjs +2 -1
- package/skills/AGENTS.md +4 -4
- package/skills/ai-slop-cleaner/SKILL.md +3 -3
- package/skills/ask/SKILL.md +7 -7
- package/skills/ask-navigator/SKILL.md +11 -11
- package/skills/autopilot/SKILL.md +5 -5
- package/skills/cancel/SKILL.md +5 -5
- package/skills/configure-notifications/SKILL.md +10 -10
- package/skills/critique/SKILL.md +1 -1
- package/skills/discover/SKILL.md +1 -1
- package/skills/drydock/SKILL.md +5 -5
- package/skills/external-context/SKILL.md +4 -4
- package/skills/graph/SKILL.md +2 -2
- package/skills/harbor/SKILL.md +7 -7
- package/skills/hud/SKILL.md +10 -10
- package/skills/intent/SKILL.md +1 -1
- package/skills/launch/SKILL.md +13 -13
- package/skills/loft/SKILL.md +2 -2
- package/skills/map/SKILL.md +1 -1
- package/skills/omc-ado-auto-review/SKILL.md +2 -2
- package/skills/omc-ado-review/SKILL.md +2 -2
- package/skills/omc-ado-setup/SKILL.md +1 -1
- package/skills/omc-ado-sprint/SKILL.md +2 -2
- package/skills/omc-ado-triage/SKILL.md +2 -2
- package/skills/omc-doctor/SKILL.md +1 -1
- package/skills/omc-gh-auto-review/SKILL.md +2 -2
- package/skills/omc-gh-project/SKILL.md +2 -2
- package/skills/omc-gh-review/SKILL.md +2 -2
- package/skills/omc-gh-setup/SKILL.md +2 -2
- package/skills/omc-gh-triage/SKILL.md +3 -3
- package/skills/omc-setup/SKILL.md +16 -14
- package/skills/omc-setup/phases/01-install-claude-md.md +1 -18
- package/skills/omc-setup/phases/02-configure.md +10 -30
- package/skills/omc-setup/phases/03-integrations.md +5 -5
- package/skills/omc-setup/phases/04-welcome.md +7 -7
- package/skills/plan/SKILL.md +1 -1
- package/skills/project-session-manager/SKILL.md +1 -1
- package/skills/ralph/SKILL.md +6 -6
- package/skills/ralph-experiment/SKILL.md +3 -3
- package/skills/ralplan/SKILL.md +4 -4
- package/skills/release/SKILL.md +1 -1
- package/skills/self-improve/SKILL.md +1 -1
- package/skills/skill/SKILL.md +12 -12
- package/skills/team/SKILL.md +8 -8
- package/skills/trace/SKILL.md +1 -1
- package/skills/visual-verdict/SKILL.md +1 -1
- package/templates/hooks/keyword-detector.mjs +4 -4
- package/templates/hooks/lib/workflow-stage-prompts.mjs +6 -2
- package/templates/hooks/persistent-mode.mjs +12 -8
- package/templates/hooks/session-start.mjs +1 -1
- package/bridge/__pycache__/gyoshu_bridge.cpython-314.pyc +0 -0
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copilot's skill registry for unattended sessions: checks a bundled skill's
|
|
3
|
+
* slash (skill-slash.ts) against `copilot skill list --json` before a session
|
|
4
|
+
* is prompted with it.
|
|
5
|
+
*/
|
|
6
|
+
import type { CliAgentType } from '../team/model-contract.js';
|
|
7
|
+
/** One entry of `copilot skill list --json`. */
|
|
8
|
+
export interface CopilotSkillEntry {
|
|
9
|
+
name: string;
|
|
10
|
+
source?: string;
|
|
11
|
+
/** The skill's directory; a plugin skill sits at `<plugin root>/skills/<dir>`. */
|
|
12
|
+
path?: string;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Lists the skills a Copilot session in `cwd` would register; null when the
|
|
16
|
+
* probe failed, `'unresolved'` when no host binary resolves on PATH.
|
|
17
|
+
*/
|
|
18
|
+
export type SkillListProbe = (cwd: string, extraArgs: readonly string[]) => CopilotSkillEntry[] | null | 'unresolved';
|
|
19
|
+
/** `<host binary> [--plugin-dir <root>] skill list --json`: free, it starts no model session. */
|
|
20
|
+
export declare const defaultSkillListProbe: SkillListProbe;
|
|
21
|
+
/** Test seam: replace the probe (and drop the per-process cache). Returns the previous probe. */
|
|
22
|
+
export declare function setSkillListProbe(probe: SkillListProbe): SkillListProbe;
|
|
23
|
+
export interface ResolveSkillSlashOptions {
|
|
24
|
+
/** Working directory of the session that will run the slash (project skills live there). */
|
|
25
|
+
cwd: string;
|
|
26
|
+
/** Host that runs the session; defaults to the detected host. */
|
|
27
|
+
host?: CliAgentType;
|
|
28
|
+
/** Args the spawned session gets before the prompt that change the skill set, e.g. `--plugin-dir`. */
|
|
29
|
+
probeArgs?: readonly string[];
|
|
30
|
+
/**
|
|
31
|
+
* The session runs without a human (an --allow-all link): a skill that is
|
|
32
|
+
* not ours throws `skill-shadowed:<name>`, and any probe failure (no host
|
|
33
|
+
* binary on PATH, timeout, non-zero exit, unparseable output) throws
|
|
34
|
+
* `skill-unverifiable:<name>`.
|
|
35
|
+
*/
|
|
36
|
+
unattended?: boolean;
|
|
37
|
+
/** Where a mismatch warning goes; stderr by default. */
|
|
38
|
+
warn?: (message: string) => void;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* The slash an unattended session should be prompted with for a bundled
|
|
42
|
+
* skill. On Copilot the registry is probed once per process (per cwd and
|
|
43
|
+
* args): a namespaced-only entry (a plugin-name collision) wins, a missing or
|
|
44
|
+
* shadowed name is warned about, and a failed probe falls back to the bare
|
|
45
|
+
* name. With `unattended`, a failed probe throws `skill-unverifiable`, and a
|
|
46
|
+
* bare entry that is not our plugin's skill (a project or user skill, another
|
|
47
|
+
* plugin's, or a plugin outside OMC_PLUGIN_ROOT and the installed-plugins dir)
|
|
48
|
+
* throws `skill-shadowed`.
|
|
49
|
+
*/
|
|
50
|
+
export declare function resolveSkillSlash(name: string, options: ResolveSkillSlashOptions): string;
|
|
51
|
+
//# sourceMappingURL=skill-registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-registry.d.ts","sourceRoot":"","sources":["../../src/utils/skill-registry.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAO9D,gDAAgD;AAChD,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kFAAkF;IAClF,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,MAAM,EAAE,KAAK,iBAAiB,EAAE,GAAG,IAAI,GAAG,YAAY,CAAC;AAmCtH,iGAAiG;AACjG,eAAO,MAAM,qBAAqB,EAAE,cAqBnC,CAAC;AAKF,iGAAiG;AACjG,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,cAAc,GAAG,cAAc,CAKvE;AAED,MAAM,WAAW,wBAAwB;IACvC,4FAA4F;IAC5F,GAAG,EAAE,MAAM,CAAC;IACZ,iEAAiE;IACjE,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,sGAAsG;IACtG,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B;;;;;OAKG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,wDAAwD;IACxD,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;CAClC;AAyCD;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,wBAAwB,GAAG,MAAM,CA4BzF"}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copilot's skill registry for unattended sessions: checks a bundled skill's
|
|
3
|
+
* slash (skill-slash.ts) against `copilot skill list --json` before a session
|
|
4
|
+
* is prompted with it.
|
|
5
|
+
*/
|
|
6
|
+
import { spawnSync } from 'child_process';
|
|
7
|
+
import { readFileSync, realpathSync } from 'fs';
|
|
8
|
+
import { dirname, isAbsolute, join, relative, win32 } from 'path';
|
|
9
|
+
import { detectHostCliType } from './host-signal.js';
|
|
10
|
+
import { getCopilotConfigDir } from './config-dir.js';
|
|
11
|
+
import { getHostCliBinary } from './host-detection.js';
|
|
12
|
+
import { SKILL_NAMESPACE, skillSlash } from './skill-slash.js';
|
|
13
|
+
import { childEnv, findOnPath, resolveBareExe } from './windows-search.js';
|
|
14
|
+
const PROBE_TIMEOUT_MS = 5_000;
|
|
15
|
+
/** A token cmd.exe could rewrite even inside quotes (`%VAR%`, a quote, a line break) is not probed. */
|
|
16
|
+
const CMD_UNSAFE = /["%\u0000-\u001f]/;
|
|
17
|
+
/**
|
|
18
|
+
* How to start the host binary found on PATH only (absolute entries), never
|
|
19
|
+
* by a cwd-relative lookup: the probe runs in the project cwd, where a repo
|
|
20
|
+
* could plant a `copilot.exe` or `copilot.cmd`. A native binary is spawned
|
|
21
|
+
* directly. An npm `.cmd`/`.bat` shim runs through
|
|
22
|
+
* `%SystemRoot%\System32\cmd.exe /d /v:off /s /c` with every token quoted;
|
|
23
|
+
* the child env (childEnv) keeps NoDefaultCurrentDirectoryInExePath set for
|
|
24
|
+
* the shim's own `node` lookup.
|
|
25
|
+
*/
|
|
26
|
+
function probeLaunch(args) {
|
|
27
|
+
const binary = getHostCliBinary();
|
|
28
|
+
if (process.platform !== 'win32') {
|
|
29
|
+
const found = binary.includes('/') ? binary : findOnPath(binary, process.env, process.platform);
|
|
30
|
+
return found ? { file: found, args: [...args], verbatim: false } : 'unresolved';
|
|
31
|
+
}
|
|
32
|
+
const exe = resolveBareExe(binary);
|
|
33
|
+
if (exe)
|
|
34
|
+
return { file: exe, args: [...args], verbatim: false };
|
|
35
|
+
const shim = findOnPath(binary, { ...process.env, PATHEXT: '.CMD;.BAT' }, 'win32');
|
|
36
|
+
if (!shim)
|
|
37
|
+
return 'unresolved';
|
|
38
|
+
const systemRoot = process.env.SystemRoot ?? process.env.SYSTEMROOT;
|
|
39
|
+
if (!systemRoot || !/^[A-Za-z]:\\[^"%\u0000-\u001f]*$/.test(systemRoot))
|
|
40
|
+
return null;
|
|
41
|
+
const tokens = [shim, ...args];
|
|
42
|
+
if (tokens.some((token) => CMD_UNSAFE.test(token)))
|
|
43
|
+
return null;
|
|
44
|
+
// Trailing backslashes are doubled so the closing quote stays a quote for the CRT argv parser.
|
|
45
|
+
const line = tokens.map((token) => `"${token.replace(/(\\+)$/, '$1$1')}"`).join(' ');
|
|
46
|
+
return { file: win32.join(systemRoot, 'System32', 'cmd.exe'), args: ['/d', '/v:off', '/s', '/c', `"${line}"`], verbatim: true };
|
|
47
|
+
}
|
|
48
|
+
/** `<host binary> [--plugin-dir <root>] skill list --json`: free, it starts no model session. */
|
|
49
|
+
export const defaultSkillListProbe = (cwd, extraArgs) => {
|
|
50
|
+
const launch = probeLaunch([...extraArgs, 'skill', 'list', '--json']);
|
|
51
|
+
if (!launch || launch === 'unresolved')
|
|
52
|
+
return launch;
|
|
53
|
+
try {
|
|
54
|
+
const result = spawnSync(launch.file, launch.args, {
|
|
55
|
+
cwd,
|
|
56
|
+
env: childEnv(process.env),
|
|
57
|
+
encoding: 'utf8',
|
|
58
|
+
timeout: PROBE_TIMEOUT_MS,
|
|
59
|
+
windowsHide: true,
|
|
60
|
+
windowsVerbatimArguments: launch.verbatim,
|
|
61
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
62
|
+
});
|
|
63
|
+
if (result.status !== 0 || typeof result.stdout !== 'string')
|
|
64
|
+
return null;
|
|
65
|
+
const parsed = JSON.parse(result.stdout);
|
|
66
|
+
if (!Array.isArray(parsed))
|
|
67
|
+
return null;
|
|
68
|
+
return parsed.filter((entry) => typeof entry === 'object' && entry !== null && typeof entry.name === 'string');
|
|
69
|
+
}
|
|
70
|
+
catch {
|
|
71
|
+
return null;
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
let activeProbe = defaultSkillListProbe;
|
|
75
|
+
const probeCache = new Map();
|
|
76
|
+
/** Test seam: replace the probe (and drop the per-process cache). Returns the previous probe. */
|
|
77
|
+
export function setSkillListProbe(probe) {
|
|
78
|
+
const previous = activeProbe;
|
|
79
|
+
activeProbe = probe;
|
|
80
|
+
probeCache.clear();
|
|
81
|
+
return previous;
|
|
82
|
+
}
|
|
83
|
+
/** Copilot's `source` is printed in a warning: strip control characters so it cannot drive the terminal. */
|
|
84
|
+
function printable(value) {
|
|
85
|
+
return value.replace(/[\u0000-\u001f\u007f-\u009f]/g, '');
|
|
86
|
+
}
|
|
87
|
+
function realKey(path) {
|
|
88
|
+
try {
|
|
89
|
+
const real = realpathSync.native(path);
|
|
90
|
+
return process.platform === 'win32' ? real.toLowerCase() : real;
|
|
91
|
+
}
|
|
92
|
+
catch {
|
|
93
|
+
return null;
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
/** The plugin root is OMC_PLUGIN_ROOT or sits under the installed-plugins dir (realpath on both sides). */
|
|
97
|
+
function isOurPluginLocation(root) {
|
|
98
|
+
const real = realKey(root);
|
|
99
|
+
if (!real)
|
|
100
|
+
return false;
|
|
101
|
+
const devRoot = process.env.OMC_PLUGIN_ROOT?.trim();
|
|
102
|
+
if (devRoot && realKey(devRoot) === real)
|
|
103
|
+
return true;
|
|
104
|
+
const installed = realKey(join(getCopilotConfigDir(), 'installed-plugins'));
|
|
105
|
+
if (!installed)
|
|
106
|
+
return false;
|
|
107
|
+
const rel = relative(installed, real);
|
|
108
|
+
return rel !== '' && !rel.startsWith('..') && !isAbsolute(rel);
|
|
109
|
+
}
|
|
110
|
+
/** A plugin entry from our plugin location whose plugin root (`<path>/../..`) has a plugin.json named oh-my-copilot. */
|
|
111
|
+
function isOurSkill(entry) {
|
|
112
|
+
if (entry.source !== 'plugin' || typeof entry.path !== 'string' || entry.path === '')
|
|
113
|
+
return false;
|
|
114
|
+
try {
|
|
115
|
+
const root = dirname(dirname(entry.path));
|
|
116
|
+
if (!isOurPluginLocation(root))
|
|
117
|
+
return false;
|
|
118
|
+
const manifest = JSON.parse(readFileSync(join(root, 'plugin.json'), 'utf8'));
|
|
119
|
+
return typeof manifest === 'object' && manifest !== null && manifest.name === SKILL_NAMESPACE;
|
|
120
|
+
}
|
|
121
|
+
catch {
|
|
122
|
+
return false;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
/**
|
|
126
|
+
* The slash an unattended session should be prompted with for a bundled
|
|
127
|
+
* skill. On Copilot the registry is probed once per process (per cwd and
|
|
128
|
+
* args): a namespaced-only entry (a plugin-name collision) wins, a missing or
|
|
129
|
+
* shadowed name is warned about, and a failed probe falls back to the bare
|
|
130
|
+
* name. With `unattended`, a failed probe throws `skill-unverifiable`, and a
|
|
131
|
+
* bare entry that is not our plugin's skill (a project or user skill, another
|
|
132
|
+
* plugin's, or a plugin outside OMC_PLUGIN_ROOT and the installed-plugins dir)
|
|
133
|
+
* throws `skill-shadowed`.
|
|
134
|
+
*/
|
|
135
|
+
export function resolveSkillSlash(name, options) {
|
|
136
|
+
const host = options.host ?? detectHostCliType();
|
|
137
|
+
if (host !== 'copilot')
|
|
138
|
+
return skillSlash(name, host);
|
|
139
|
+
const probeArgs = options.probeArgs ?? [];
|
|
140
|
+
const key = `${options.cwd}\0${probeArgs.join('\0')}`;
|
|
141
|
+
if (!probeCache.has(key))
|
|
142
|
+
probeCache.set(key, activeProbe(options.cwd, probeArgs));
|
|
143
|
+
const entries = probeCache.get(key);
|
|
144
|
+
if ((!entries || entries === 'unresolved') && options.unattended) {
|
|
145
|
+
const why = entries === 'unresolved' ? 'no copilot binary on PATH to list the registered skills' : 'the registered skills could not be listed';
|
|
146
|
+
throw new Error(`skill-unverifiable:${name}: ${why}; an unattended session cannot be checked for a shadowing skill`);
|
|
147
|
+
}
|
|
148
|
+
// An interactive caller has a human at the prompt: the bare name goes out.
|
|
149
|
+
if (!entries || entries === 'unresolved')
|
|
150
|
+
return skillSlash(name, host);
|
|
151
|
+
const warn = options.warn ?? ((message) => process.stderr.write(`[oh-my-copilot] ${message}\n`));
|
|
152
|
+
const bare = entries.find((entry) => entry.name === name);
|
|
153
|
+
if (bare) {
|
|
154
|
+
if (options.unattended && !isOurSkill(bare)) {
|
|
155
|
+
throw new Error(`skill-shadowed:${name}: a ${printable(bare.source ?? 'unknown')} skill registers as /${name}; an unattended session would run it instead of the bundled skill`);
|
|
156
|
+
}
|
|
157
|
+
if (bare.source && bare.source !== 'plugin') {
|
|
158
|
+
warn(`a ${printable(bare.source)} skill named "${name}" shadows the bundled skill; /${name} will run that skill instead.`);
|
|
159
|
+
}
|
|
160
|
+
return `/${name}`;
|
|
161
|
+
}
|
|
162
|
+
const namespaced = `${SKILL_NAMESPACE}:${name}`;
|
|
163
|
+
if (entries.some((entry) => entry.name === namespaced))
|
|
164
|
+
return `/${namespaced}`;
|
|
165
|
+
warn(`copilot skill list has no skill named "${name}"; /${name} may be rejected as an unknown command.`);
|
|
166
|
+
return `/${name}`;
|
|
167
|
+
}
|
|
168
|
+
//# sourceMappingURL=skill-registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-registry.js","sourceRoot":"","sources":["../../src/utils/skill-registry.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,IAAI,CAAC;AAChD,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAElE,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AACt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|
+
*
|
|
4
|
+
* Copilot CLI (>= 1.0.66, verified on 1.0.105) registers a plugin skill under
|
|
5
|
+
* its bare frontmatter name (`/ralph`) and rejects `/oh-my-copilot:ralph` as
|
|
6
|
+
* an unknown command. It namespaces a plugin skill only when two plugins ship
|
|
7
|
+
* the same name (then both are `/<plugin>:<name>` and the bare name is gone),
|
|
8
|
+
* and a project skill of the same name silently replaces the plugin skill.
|
|
9
|
+
* Claude Code registers the plugin's skills as `/oh-my-copilot:<name>`.
|
|
10
|
+
* Unattended sessions check the name against Copilot's registry with
|
|
11
|
+
* resolveSkillSlash (skill-registry.ts).
|
|
12
|
+
*/
|
|
13
|
+
import type { CliAgentType } from '../team/model-contract.js';
|
|
14
|
+
/** The plugin name both hosts use as the skill namespace. */
|
|
15
|
+
export declare const SKILL_NAMESPACE = "oh-my-copilot";
|
|
16
|
+
/** The slash command a host resolves for a bundled skill. */
|
|
17
|
+
export declare function skillSlash(name: string, host?: CliAgentType): string;
|
|
18
|
+
//# sourceMappingURL=skill-slash.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-slash.d.ts","sourceRoot":"","sources":["../../src/utils/skill-slash.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAG9D,6DAA6D;AAC7D,eAAO,MAAM,eAAe,kBAAkB,CAAC;AAE/C,6DAA6D;AAC7D,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,GAAE,YAAkC,GAAG,MAAM,CAEzF"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Host-aware slash names for bundled skills.
|
|
3
|
+
*
|
|
4
|
+
* Copilot CLI (>= 1.0.66, verified on 1.0.105) registers a plugin skill under
|
|
5
|
+
* its bare frontmatter name (`/ralph`) and rejects `/oh-my-copilot:ralph` as
|
|
6
|
+
* an unknown command. It namespaces a plugin skill only when two plugins ship
|
|
7
|
+
* the same name (then both are `/<plugin>:<name>` and the bare name is gone),
|
|
8
|
+
* and a project skill of the same name silently replaces the plugin skill.
|
|
9
|
+
* Claude Code registers the plugin's skills as `/oh-my-copilot:<name>`.
|
|
10
|
+
* Unattended sessions check the name against Copilot's registry with
|
|
11
|
+
* resolveSkillSlash (skill-registry.ts).
|
|
12
|
+
*/
|
|
13
|
+
import { detectHostCliType } from './host-signal.js';
|
|
14
|
+
/** The plugin name both hosts use as the skill namespace. */
|
|
15
|
+
export const SKILL_NAMESPACE = 'oh-my-copilot';
|
|
16
|
+
/** The slash command a host resolves for a bundled skill. */
|
|
17
|
+
export function skillSlash(name, host = detectHostCliType()) {
|
|
18
|
+
return host === 'copilot' ? `/${name}` : `/${SKILL_NAMESPACE}:${name}`;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=skill-slash.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"skill-slash.js","sourceRoot":"","sources":["../../src/utils/skill-slash.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAErD,6DAA6D;AAC7D,MAAM,CAAC,MAAM,eAAe,GAAG,eAAe,CAAC;AAE/C,6DAA6D;AAC7D,MAAM,UAAU,UAAU,CAAC,IAAY,EAAE,OAAqB,iBAAiB,EAAE;IAC/E,OAAO,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,eAAe,IAAI,IAAI,EAAE,CAAC;AACzE,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Windows executable search hardening.
|
|
3
|
+
*
|
|
4
|
+
* On Windows a child spawned by bare name (`git`, `npm`, `gh`) is looked up in
|
|
5
|
+
* the current directory before PATH unless NoDefaultCurrentDirectoryInExePath
|
|
6
|
+
* is set, so a `git.exe` or `git.cmd` planted in the project folder runs
|
|
7
|
+
* instead of the real one. cmd.exe (`shell: true`, exec) reads the child's env
|
|
8
|
+
* block and honours the variable on every version. libuv's own lookup (no
|
|
9
|
+
* shell) reads the parent's environment but honours it only from libuv 1.48
|
|
10
|
+
* (Node 22); on Node 20 a bare no-shell spawn still searches the current
|
|
11
|
+
* directory, so those spawns also go through resolveBareExe().
|
|
12
|
+
* Every entry point therefore hardens its own environment first, and any
|
|
13
|
+
* explicit `env:` built without process.env goes through childEnv().
|
|
14
|
+
* ESM evaluates every import before the entry's body calls the hardening, so
|
|
15
|
+
* nothing an entry point imports may spawn at module-load time.
|
|
16
|
+
*
|
|
17
|
+
* Multi-surface mirrors (keep in sync):
|
|
18
|
+
* scripts/lib/windows-search.cjs — CJS hook/script runtime
|
|
19
|
+
* scripts/lib/windows-search.mjs — ESM re-export of the CJS runtime
|
|
20
|
+
*/
|
|
21
|
+
/** Turn off the current-directory search for this process and every child that inherits its env. No-op off win32. */
|
|
22
|
+
export declare function hardenWindowsExeSearch(): void;
|
|
23
|
+
/** A copy of `env` that keeps the current-directory search off in the child (win32 only). */
|
|
24
|
+
export declare function childEnv<T extends Record<string, string | undefined>>(env: T): T;
|
|
25
|
+
/**
|
|
26
|
+
* `name` on `env`'s PATH (PATHEXT on win32), or null. Empty and relative
|
|
27
|
+
* entries are skipped, and so is any entry under a `node_modules` dir (npx
|
|
28
|
+
* and npm scripts put `node_modules/.bin` first, so a package's shim would
|
|
29
|
+
* stand in for the host git that `git --exec-path` runs).
|
|
30
|
+
*/
|
|
31
|
+
export declare function findOnPath(name: string, env: NodeJS.ProcessEnv, platform: NodeJS.Platform, exists?: (p: string) => boolean): string | null;
|
|
32
|
+
/**
|
|
33
|
+
* Absolute path of a bare `cmd` for a no-shell spawn on win32, or null when
|
|
34
|
+
* no PATH entry holds a directly runnable one. libuv before 1.48 (Node 20)
|
|
35
|
+
* searches the current directory for a bare name even with
|
|
36
|
+
* NoDefaultCurrentDirectoryInExePath set, so the name is resolved against
|
|
37
|
+
* absolute PATH entries first. `.cmd`/`.bat` are not candidates: they need
|
|
38
|
+
* cmd.exe, which honours the variable on every version. Off win32, or for a
|
|
39
|
+
* name that already has a path, `cmd` comes back unchanged.
|
|
40
|
+
*/
|
|
41
|
+
export declare function resolveBareExe(cmd: string, env?: NodeJS.ProcessEnv): string | null;
|
|
42
|
+
//# sourceMappingURL=windows-search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"windows-search.d.ts","sourceRoot":"","sources":["../../src/utils/windows-search.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAWH,qHAAqH;AACrH,wBAAgB,sBAAsB,IAAI,IAAI,CAM7C;AAED,6FAA6F;AAC7F,wBAAgB,QAAQ,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,CAOhF;AAUD;;;;;GAKG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,UAAU,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,MAAM,GAAE,CAAC,CAAC,EAAE,MAAM,KAAK,OAAgB,GAAG,MAAM,GAAG,IAAI,CAUlJ;AAED;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,MAAM,GAAG,IAAI,CAI/F"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Windows executable search hardening.
|
|
3
|
+
*
|
|
4
|
+
* On Windows a child spawned by bare name (`git`, `npm`, `gh`) is looked up in
|
|
5
|
+
* the current directory before PATH unless NoDefaultCurrentDirectoryInExePath
|
|
6
|
+
* is set, so a `git.exe` or `git.cmd` planted in the project folder runs
|
|
7
|
+
* instead of the real one. cmd.exe (`shell: true`, exec) reads the child's env
|
|
8
|
+
* block and honours the variable on every version. libuv's own lookup (no
|
|
9
|
+
* shell) reads the parent's environment but honours it only from libuv 1.48
|
|
10
|
+
* (Node 22); on Node 20 a bare no-shell spawn still searches the current
|
|
11
|
+
* directory, so those spawns also go through resolveBareExe().
|
|
12
|
+
* Every entry point therefore hardens its own environment first, and any
|
|
13
|
+
* explicit `env:` built without process.env goes through childEnv().
|
|
14
|
+
* ESM evaluates every import before the entry's body calls the hardening, so
|
|
15
|
+
* nothing an entry point imports may spawn at module-load time.
|
|
16
|
+
*
|
|
17
|
+
* Multi-surface mirrors (keep in sync):
|
|
18
|
+
* scripts/lib/windows-search.cjs — CJS hook/script runtime
|
|
19
|
+
* scripts/lib/windows-search.mjs — ESM re-export of the CJS runtime
|
|
20
|
+
*/
|
|
21
|
+
import { statSync } from 'node:fs';
|
|
22
|
+
import { posix, win32 } from 'node:path';
|
|
23
|
+
const VARIABLE = 'NoDefaultCurrentDirectoryInExePath';
|
|
24
|
+
function isVariable(key) {
|
|
25
|
+
return key.toUpperCase() === VARIABLE.toUpperCase();
|
|
26
|
+
}
|
|
27
|
+
/** Turn off the current-directory search for this process and every child that inherits its env. No-op off win32. */
|
|
28
|
+
export function hardenWindowsExeSearch() {
|
|
29
|
+
if (process.platform !== 'win32')
|
|
30
|
+
return;
|
|
31
|
+
for (const key of Object.keys(process.env)) {
|
|
32
|
+
if (isVariable(key))
|
|
33
|
+
delete process.env[key];
|
|
34
|
+
}
|
|
35
|
+
process.env[VARIABLE] = '1';
|
|
36
|
+
}
|
|
37
|
+
/** A copy of `env` that keeps the current-directory search off in the child (win32 only). */
|
|
38
|
+
export function childEnv(env) {
|
|
39
|
+
const out = {};
|
|
40
|
+
for (const [key, value] of Object.entries(env)) {
|
|
41
|
+
if (process.platform !== 'win32' || !isVariable(key))
|
|
42
|
+
out[key] = value;
|
|
43
|
+
}
|
|
44
|
+
if (process.platform === 'win32')
|
|
45
|
+
out[VARIABLE] = '1';
|
|
46
|
+
return out;
|
|
47
|
+
}
|
|
48
|
+
const isFile = (p) => { try {
|
|
49
|
+
return statSync(p).isFile();
|
|
50
|
+
}
|
|
51
|
+
catch {
|
|
52
|
+
return false;
|
|
53
|
+
} };
|
|
54
|
+
function envValue(env, name) {
|
|
55
|
+
const key = Object.keys(env).find((k) => k.toUpperCase() === name);
|
|
56
|
+
const value = key === undefined ? undefined : env[key];
|
|
57
|
+
return typeof value === 'string' && value.trim() !== '' ? value : undefined;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* `name` on `env`'s PATH (PATHEXT on win32), or null. Empty and relative
|
|
61
|
+
* entries are skipped, and so is any entry under a `node_modules` dir (npx
|
|
62
|
+
* and npm scripts put `node_modules/.bin` first, so a package's shim would
|
|
63
|
+
* stand in for the host git that `git --exec-path` runs).
|
|
64
|
+
*/
|
|
65
|
+
export function findOnPath(name, env, platform, exists = isFile) {
|
|
66
|
+
const P = platform === 'win32' ? win32 : posix;
|
|
67
|
+
const exts = platform === 'win32' ? (envValue(env, 'PATHEXT') ?? '.COM;.EXE;.BAT;.CMD').split(';').filter(Boolean) : [''];
|
|
68
|
+
const inNodeModules = platform === 'win32' ? /(^|[\\/])node_modules([\\/]|$)/i : /(^|\/)node_modules(\/|$)/;
|
|
69
|
+
for (const raw of (envValue(env, 'PATH') ?? '').split(P.delimiter)) {
|
|
70
|
+
const dir = raw.trim().replace(/^"(.*)"$/, '$1');
|
|
71
|
+
if (!dir || !P.isAbsolute(dir) || inNodeModules.test(dir))
|
|
72
|
+
continue;
|
|
73
|
+
for (const ext of exts)
|
|
74
|
+
if (exists(P.join(dir, name + ext)))
|
|
75
|
+
return P.join(dir, name + ext);
|
|
76
|
+
}
|
|
77
|
+
return null;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Absolute path of a bare `cmd` for a no-shell spawn on win32, or null when
|
|
81
|
+
* no PATH entry holds a directly runnable one. libuv before 1.48 (Node 20)
|
|
82
|
+
* searches the current directory for a bare name even with
|
|
83
|
+
* NoDefaultCurrentDirectoryInExePath set, so the name is resolved against
|
|
84
|
+
* absolute PATH entries first. `.cmd`/`.bat` are not candidates: they need
|
|
85
|
+
* cmd.exe, which honours the variable on every version. Off win32, or for a
|
|
86
|
+
* name that already has a path, `cmd` comes back unchanged.
|
|
87
|
+
*/
|
|
88
|
+
export function resolveBareExe(cmd, env = process.env) {
|
|
89
|
+
if (process.platform !== 'win32' || /[\\/:]/.test(cmd))
|
|
90
|
+
return cmd;
|
|
91
|
+
const pathext = (envValue(env, 'PATHEXT') ?? '.COM;.EXE;.BAT;.CMD').split(';').filter((e) => e && !/^\.(cmd|bat)$/i.test(e)).join(';') || '.COM;.EXE';
|
|
92
|
+
return findOnPath(cmd, { ...env, PATHEXT: pathext }, 'win32');
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=windows-search.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"windows-search.js","sourceRoot":"","sources":["../../src/utils/windows-search.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,MAAM,WAAW,CAAC;AAEzC,MAAM,QAAQ,GAAG,oCAAoC,CAAC;AAEtD,SAAS,UAAU,CAAC,GAAW;IAC7B,OAAO,GAAG,CAAC,WAAW,EAAE,KAAK,QAAQ,CAAC,WAAW,EAAE,CAAC;AACtD,CAAC;AAED,qHAAqH;AACrH,MAAM,UAAU,sBAAsB;IACpC,IAAI,OAAO,CAAC,QAAQ,KAAK,OAAO;QAAE,OAAO;IACzC,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;QAC3C,IAAI,UAAU,CAAC,GAAG,CAAC;YAAE,OAAO,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;IAC/C,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AO,CAAC,QAAQ,KAAK,OAAO,IAAI,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC;QAAE,OAAO,GAAG,CAAC;IACnE,MAAM,OAAO,GAAG,CAAC,QAAQ,CAAC,GAAG,EAAE,SAAS,CAAC,IAAI,qBAAqB,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,WAAW,CAAC;IACtJ,OAAO,UAAU,CAAC,GAAG,EAAE,EAAE,GAAG,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;AAChE,CAAC"}
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -216,18 +216,18 @@ Active skills: team + execute + git-master
|
|
|
216
216
|
|
|
217
217
|
**Slash commands:**
|
|
218
218
|
```bash
|
|
219
|
-
/
|
|
220
|
-
/
|
|
221
|
-
/
|
|
222
|
-
/
|
|
223
|
-
/
|
|
219
|
+
/omc-plan "plan a todo app"
|
|
220
|
+
/execute build me a todo app
|
|
221
|
+
/omc-review [path]
|
|
222
|
+
/verify [target]
|
|
223
|
+
/team 3:executor "implement fullstack app"
|
|
224
224
|
```
|
|
225
225
|
|
|
226
226
|
**Magic keywords** — include a keyword in natural language and the skill activates automatically:
|
|
227
227
|
```bash
|
|
228
228
|
autopilot build me a todo app # activates autopilot
|
|
229
229
|
ralph: refactor the auth module # activates ralph
|
|
230
|
-
/
|
|
230
|
+
/team 3:executor "implement OAuth" # explicit parallel team skill
|
|
231
231
|
```
|
|
232
232
|
|
|
233
233
|
### Core Workflow Skills
|
|
@@ -248,24 +248,24 @@ ralph: refactor the authentication module
|
|
|
248
248
|
|
|
249
249
|
#### execute
|
|
250
250
|
Carries an approved task through to working, verified code.
|
|
251
|
-
- Manual command: `/
|
|
251
|
+
- Manual command: `/execute`
|
|
252
252
|
```bash
|
|
253
|
-
/
|
|
253
|
+
/execute implement user authentication with OAuth
|
|
254
254
|
```
|
|
255
|
-
For coordinated parallel workers, use `/
|
|
255
|
+
For coordinated parallel workers, use `/team` instead.
|
|
256
256
|
|
|
257
257
|
#### team
|
|
258
258
|
Coordinates N Claude agents with a 5-stage pipeline: `plan → prd → exec → verify → fix`
|
|
259
259
|
```bash
|
|
260
|
-
/
|
|
260
|
+
/team 3:executor "implement fullstack todo app"
|
|
261
261
|
```
|
|
262
262
|
|
|
263
263
|
#### Multi-provider advice with ask + team
|
|
264
|
-
The retired `ccg` workflow is replaced by `/
|
|
264
|
+
The retired `ccg` workflow is replaced by `/ask` plus `/team`: ask the selected providers for independent advice, then use a team to synthesize the results.
|
|
265
265
|
```bash
|
|
266
|
-
/
|
|
267
|
-
/
|
|
268
|
-
/
|
|
266
|
+
/ask codex "review this authentication implementation"
|
|
267
|
+
/ask antigravity "review this authentication implementation"
|
|
268
|
+
/team 2:executor "synthesize the advisor findings"
|
|
269
269
|
```
|
|
270
270
|
|
|
271
271
|
#### ralplan
|
|
@@ -279,21 +279,21 @@ ralplan this feature
|
|
|
279
279
|
|
|
280
280
|
| Skill | Description | Command |
|
|
281
281
|
|-------|-------------|---------|
|
|
282
|
-
| `cancel` | Cancel active execution mode | `/
|
|
283
|
-
| `hud` | Status bar configuration | `/
|
|
284
|
-
| `omc-setup` | Initial setup wizard | `/
|
|
285
|
-
| `omc-doctor` | Diagnose installation | `/
|
|
286
|
-
| `skillify` | Extract reusable skills from session | `/
|
|
287
|
-
| `skill` | Manage local skills (list/add/remove) | `/
|
|
288
|
-
| `trace` | Evidence-driven causal tracing | `/
|
|
289
|
-
| `release` | Automated release workflow | `/
|
|
290
|
-
| `deepinit` | Generate hierarchical AGENTS.md | `/
|
|
282
|
+
| `cancel` | Cancel active execution mode | `/cancel` |
|
|
283
|
+
| `hud` | Status bar configuration | `/hud` |
|
|
284
|
+
| `omc-setup` | Initial setup wizard | `/omc-setup` |
|
|
285
|
+
| `omc-doctor` | Diagnose installation | `/omc-doctor` |
|
|
286
|
+
| `skillify` | Extract reusable skills from session | `/skillify` |
|
|
287
|
+
| `skill` | Manage local skills (list/add/remove) | `/skill` |
|
|
288
|
+
| `trace` | Evidence-driven causal tracing | `/trace` |
|
|
289
|
+
| `release` | Automated release workflow | `/release` |
|
|
290
|
+
| `deepinit` | Generate hierarchical AGENTS.md | `/deepinit` |
|
|
291
291
|
| `deep-interview` | Socratic deep interview | `/deep-interview` |
|
|
292
|
-
| `research` | Parallel or focused research | `/
|
|
293
|
-
| `external-context` | Parallel document-specialist research | `/
|
|
294
|
-
| `ai-slop-cleaner` | Clean AI expression patterns | `/
|
|
295
|
-
| `configure-notifications` | Configure Telegram, Discord, and Slack notification integrations | `/
|
|
296
|
-
| `remember` | Save durable session memory | `/
|
|
292
|
+
| `research` | Parallel or focused research | `/research` |
|
|
293
|
+
| `external-context` | Parallel document-specialist research | `/external-context` |
|
|
294
|
+
| `ai-slop-cleaner` | Clean AI expression patterns | `/ai-slop-cleaner` |
|
|
295
|
+
| `configure-notifications` | Configure Telegram, Discord, and Slack notification integrations | `/configure-notifications` |
|
|
296
|
+
| `remember` | Save durable session memory | `/remember` |
|
|
297
297
|
|
|
298
298
|
### Shipyard document discipline
|
|
299
299
|
|
|
@@ -328,7 +328,7 @@ cross-ranked; the ticket fails when either axis fails.
|
|
|
328
328
|
| `deslop`, `anti-slop` | AI expression cleanup |
|
|
329
329
|
| `cancelomc`, `stopomc` | Cancel active execution mode |
|
|
330
330
|
|
|
331
|
-
Parallel work is not a magic keyword; invoke `/
|
|
331
|
+
Parallel work is not a magic keyword; invoke `/team` explicitly. Use `/execute` to carry an approved task through verified code.
|
|
332
332
|
|
|
333
333
|
### Keyword Detection Sources
|
|
334
334
|
|
package/docs/CLAUDE.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<!-- OMC:START -->
|
|
2
|
-
<!-- OMC:VERSION:5.19.
|
|
2
|
+
<!-- OMC:VERSION:5.19.4 -->
|
|
3
3
|
|
|
4
4
|
# oh-my-copilot - Intelligent Multi-Agent Orchestration
|
|
5
5
|
|
|
@@ -26,7 +26,7 @@ Direct writes OK for: `.omg/**`, `~/.copilot/skills/**`, `.copilot/skills/**`, `
|
|
|
26
26
|
</model_routing>
|
|
27
27
|
|
|
28
28
|
<skills>
|
|
29
|
-
Invoke via `/oh-my-copilot:<name
|
|
29
|
+
Invoke via `/<name>` (on Claude Code: `/oh-my-copilot:<name>`). Trigger patterns auto-detect keywords.
|
|
30
30
|
**Canonical workflows (Tier-0):** `plan` → `execute` → `review` → `verify`. Roles: `planner` → `executor` → `reviewer` → `verifier`. `deep-interview` and `ralplan` are independent Tier-0 planning workflows. `research` and `team` are internal lanes; `autopilot`, `autoresearch`, `ralph`, and `ultragoal` remain directly invocable.
|
|
31
31
|
**Retired in 5.0.0 (removed, not aliased):** `ultrawork`, `ultraqa`, `ultrapilot`, `swarm`, `pipeline`, `merge-readiness`, `deep-dive`, `sciomc`, `ccg`, `omc-teams`, `setup`, `mcp-setup`, `omc-reference`, `learner`, `writer-memory`, `local-build-reminder`. Use `execute`, `verify`, `review`, `research`, `omc-setup`, `wiki`, `remember`, or `team` instead.
|
|
32
32
|
Keyword triggers: `"autopilot"→autopilot`, `"ralph"→ralph`, `"ralplan"→ralplan`, `"deep interview"→deep-interview`, `"deslop"`/`"anti-slop"`→ai-slop-cleaner (→`review`, opt-in), `"deep-analyze"`→analysis mode, `"tdd"`→TDD mode, `"deepsearch"`→codebase search, `"ultrathink"`→deep reasoning, `"cancelomc"`→cancel. Team orchestration is explicit via `/team`.
|
|
@@ -60,7 +60,7 @@ Kill switches: `DISABLE_OMC`, `OMC_SKIP_HOOKS` (comma-separated).
|
|
|
60
60
|
</hooks_and_context>
|
|
61
61
|
|
|
62
62
|
<cancellation>
|
|
63
|
-
`/
|
|
63
|
+
`/cancel` ends execution modes. Cancel when done+verified or blocked. Don't cancel if work incomplete.
|
|
64
64
|
</cancellation>
|
|
65
65
|
|
|
66
66
|
<worktree_paths>
|
|
@@ -69,6 +69,6 @@ State root: `.omg/` by default, or `$OMC_STATE_DIR/{project-id}/` when `OMC_STAT
|
|
|
69
69
|
|
|
70
70
|
## Setup
|
|
71
71
|
|
|
72
|
-
Say "setup omc" or run `/
|
|
72
|
+
Say "setup omc" or run `/omc-setup`.
|
|
73
73
|
|
|
74
74
|
<!-- OMC:END -->
|