gemiterm 2.0.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/.env +2 -0
- package/.github/workflows/manual-release.yml +34 -0
- package/.github/workflows/release.yml +198 -0
- package/.github/workflows/test.yml +29 -0
- package/.opencode/commands/opsx-apply.md +152 -0
- package/.opencode/commands/opsx-archive.md +157 -0
- package/.opencode/commands/opsx-explore.md +169 -0
- package/.opencode/commands/opsx-propose.md +104 -0
- package/.opencode/commands/opsx-sync.md +140 -0
- package/.opencode/commands/search-intelligently.md +9 -0
- package/.opencode/opencode.json +20 -0
- package/.opencode/skills/intellisearch/.version +1 -0
- package/.opencode/skills/intellisearch/SKILL.md +84 -0
- package/.opencode/skills/intellisearch/references/brave-search.md +67 -0
- package/.opencode/skills/intellisearch/references/ddg-search.md +79 -0
- package/.opencode/skills/intellisearch/references/deepwiki-tools.md +246 -0
- package/.opencode/skills/intellisearch/references/examples.md +97 -0
- package/.opencode/skills/intellisearch/references/gh-cli.md +143 -0
- package/.opencode/skills/intellisearch/references/google-search.md +40 -0
- package/.opencode/skills/intellisearch/references/search-workflow.md +143 -0
- package/.opencode/skills/intellisearch/references/workflow.md +115 -0
- package/.opencode/skills/openspec-apply-change/SKILL.md +159 -0
- package/.opencode/skills/openspec-archive-change/SKILL.md +117 -0
- package/.opencode/skills/openspec-explore/SKILL.md +287 -0
- package/.opencode/skills/openspec-propose/SKILL.md +111 -0
- package/.opencode/skills/openspec-sync-specs/SKILL.md +147 -0
- package/.serena/project.yml +133 -0
- package/AGENTS.md +136 -0
- package/CHANGELOG.md +3 -0
- package/README.md +245 -0
- package/bun.lock +105 -0
- package/docs/INSTALL.md +185 -0
- package/docs/PLAYWRIGHT_CLI_API.md +306 -0
- package/docs/python-release-for-reference.md +175 -0
- package/examples/sample_json_export.json +32 -0
- package/examples/sample_markdown_export.md +221 -0
- package/examples/usage_examples.sh +222 -0
- package/install.ps1 +264 -0
- package/install.sh +275 -0
- package/openspec/MAESTRO_MIGRATION.md +180 -0
- package/openspec/changes/archive/2026-06-08-command-spec-conformance/.openspec.yaml +2 -0
- package/openspec/changes/archive/2026-06-08-command-spec-conformance/design.md +194 -0
- package/openspec/changes/archive/2026-06-08-command-spec-conformance/proposal.md +52 -0
- package/openspec/changes/archive/2026-06-08-command-spec-conformance/specs/multi-profile-conversations/spec.md +133 -0
- package/openspec/changes/archive/2026-06-08-command-spec-conformance/tasks.md +95 -0
- package/openspec/changes/archive/2026-06-09-refactor-interactive-prompt-loop/.openspec.yaml +2 -0
- package/openspec/changes/archive/2026-06-09-refactor-interactive-prompt-loop/design.md +28 -0
- package/openspec/changes/archive/2026-06-09-refactor-interactive-prompt-loop/proposal.md +22 -0
- package/openspec/changes/archive/2026-06-09-refactor-interactive-prompt-loop/specs/interactive-prompt-loop/spec.md +35 -0
- package/openspec/changes/archive/2026-06-09-refactor-interactive-prompt-loop/tasks.md +28 -0
- package/openspec/changes/archive/2026-06-09-replace-gemini-api-placeholder-with-gemini-reverse/.openspec.yaml +2 -0
- package/openspec/changes/archive/2026-06-09-replace-gemini-api-placeholder-with-gemini-reverse/design.md +323 -0
- package/openspec/changes/archive/2026-06-09-replace-gemini-api-placeholder-with-gemini-reverse/proposal.md +122 -0
- package/openspec/changes/archive/2026-06-09-replace-gemini-api-placeholder-with-gemini-reverse/specs/no-capability-changes/spec.md +29 -0
- package/openspec/changes/archive/2026-06-09-replace-gemini-api-placeholder-with-gemini-reverse/tasks.md +172 -0
- package/openspec/changes/archive/2026-06-09-v2-install-migration/.openspec.yaml +2 -0
- package/openspec/changes/archive/2026-06-09-v2-install-migration/design.md +241 -0
- package/openspec/changes/archive/2026-06-09-v2-install-migration/proposal.md +41 -0
- package/openspec/changes/archive/2026-06-09-v2-install-migration/specs/v2-installer/spec.md +205 -0
- package/openspec/changes/archive/2026-06-09-v2-install-migration/tasks.md +97 -0
- package/openspec/changes/commander-cli-parser/.openspec.yaml +2 -0
- package/openspec/changes/commander-cli-parser/design.md +107 -0
- package/openspec/changes/commander-cli-parser/proposal.md +31 -0
- package/openspec/changes/commander-cli-parser/specs/cli/spec.md +48 -0
- package/openspec/changes/commander-cli-parser/tasks.md +33 -0
- package/openspec/changes/cross-platform-build-and-ci/.openspec.yaml +2 -0
- package/openspec/changes/cross-platform-build-and-ci/design.md +213 -0
- package/openspec/changes/cross-platform-build-and-ci/proposal.md +50 -0
- package/openspec/changes/cross-platform-build-and-ci/specs/path-and-file-mediation/spec.md +335 -0
- package/openspec/changes/cross-platform-build-and-ci/specs/release-pipeline/spec.md +95 -0
- package/openspec/changes/cross-platform-build-and-ci/tasks.md +164 -0
- package/openspec/config.yaml +20 -0
- package/openspec/specs/auth/spec.md +394 -0
- package/openspec/specs/cli/spec.md +108 -0
- package/openspec/specs/commands/spec.md +409 -0
- package/openspec/specs/configuration/spec.md +130 -0
- package/openspec/specs/conversations/spec.md +139 -0
- package/openspec/specs/domain-model/spec.md +128 -0
- package/openspec/specs/formatters/spec.md +158 -0
- package/openspec/specs/install-browser/spec.md +146 -0
- package/openspec/specs/interactive-prompt-loop/spec.md +41 -0
- package/openspec/specs/logger/spec.md +71 -0
- package/openspec/specs/mediator/spec.md +72 -0
- package/openspec/specs/multi-profile-conversations/spec.md +145 -0
- package/openspec/specs/path-utils/spec.md +101 -0
- package/openspec/specs/profiles/spec.md +94 -0
- package/openspec/specs/storage/spec.md +198 -0
- package/openspec/specs/testing/spec.md +237 -0
- package/openspec/specs/v2-installer/spec.md +205 -0
- package/openspec/specs/validators/spec.md +65 -0
- package/package.json +45 -0
- package/scripts/build.ts +88 -0
- package/scripts/clean-build.ps1 +4 -0
- package/scripts/clean-build.sh +5 -0
- package/scripts/install-browser.ps1 +5 -0
- package/scripts/install-browser.sh +6 -0
- package/scripts/lint-path-mediation.ps1 +65 -0
- package/scripts/lint-path-mediation.sh +40 -0
- package/src/cli/.gitkeep +0 -0
- package/src/cli/command-registry.ts +62 -0
- package/src/cli/commands/auth-command.ts +179 -0
- package/src/cli/commands/continue-command.ts +158 -0
- package/src/cli/commands/delete-command.ts +163 -0
- package/src/cli/commands/export-all-command.ts +243 -0
- package/src/cli/commands/export-command.ts +156 -0
- package/src/cli/commands/fetch-command.ts +176 -0
- package/src/cli/commands/help.ts +45 -0
- package/src/cli/commands/install-browser-command.ts +33 -0
- package/src/cli/commands/list-command.ts +226 -0
- package/src/cli/commands/new-command.ts +147 -0
- package/src/cli/commands/profile-command.ts +226 -0
- package/src/cli/commands/status-command.ts +59 -0
- package/src/cli/index.ts +213 -0
- package/src/cli/utils/interactive-prompt.ts +64 -0
- package/src/core/.gitkeep +0 -0
- package/src/core/command-handlers.ts +240 -0
- package/src/core/errors.ts +41 -0
- package/src/core/mediator.ts +58 -0
- package/src/core/query-handlers.ts +163 -0
- package/src/core/types.ts +43 -0
- package/src/infrastructure/.gitkeep +0 -0
- package/src/infrastructure/cli-table.ts +45 -0
- package/src/infrastructure/config.ts +52 -0
- package/src/infrastructure/formatters.ts +130 -0
- package/src/infrastructure/io.ts +161 -0
- package/src/infrastructure/logger.ts +41 -0
- package/src/infrastructure/path-utils.ts +157 -0
- package/src/infrastructure/storage.ts +209 -0
- package/src/infrastructure/validators.ts +28 -0
- package/src/services/.gitkeep +0 -0
- package/src/services/auth-service.ts +135 -0
- package/src/services/cookie-monitor.ts +159 -0
- package/src/services/cookie-storage-service.ts +74 -0
- package/src/services/gemini-client-wrapper.ts +239 -0
- package/src/services/install-browser-service.ts +205 -0
- package/src/services/playwright-cli-driver.ts +269 -0
- package/src/services/profile-auth-manager.ts +65 -0
- package/src/services/profile-service.ts +121 -0
- package/tests/cli/auth-command.test.ts +220 -0
- package/tests/cli/command-registry.test.ts +67 -0
- package/tests/cli/continue-command.test.ts +100 -0
- package/tests/cli/delete-command.test.ts +128 -0
- package/tests/cli/export-all-command.test.ts +375 -0
- package/tests/cli/install-browser-command.test.ts +48 -0
- package/tests/cli/list-command.test.ts +179 -0
- package/tests/cli/new-command.test.ts +139 -0
- package/tests/cli/status-command.test.ts +106 -0
- package/tests/core/query-handlers.test.ts +187 -0
- package/tests/fixtures/auth-fixtures.ts +98 -0
- package/tests/fixtures/chat-fixtures.ts +87 -0
- package/tests/infrastructure/cli-table.test.ts +107 -0
- package/tests/infrastructure/formatters.test.ts +202 -0
- package/tests/infrastructure/io.test.ts +197 -0
- package/tests/infrastructure/logger.test.ts +74 -0
- package/tests/infrastructure/storage.test.ts +335 -0
- package/tests/infrastructure/validators.test.ts +67 -0
- package/tests/integration/commands/auth.test.ts +186 -0
- package/tests/integration/commands/continue.test.ts +130 -0
- package/tests/integration/commands/delete.test.ts +140 -0
- package/tests/integration/commands/export.test.ts +266 -0
- package/tests/integration/commands/fetch.test.ts +238 -0
- package/tests/integration/commands/list.test.ts +281 -0
- package/tests/integration/commands/profile.test.ts +258 -0
- package/tests/integration/commands/status.test.ts +223 -0
- package/tests/integration/installer-script-shape.test.ts +67 -0
- package/tests/parity/compare-outputs.ts +359 -0
- package/tests/parity/test-commands-parity.ps1 +82 -0
- package/tests/parity/test-commands-parity.sh +61 -0
- package/tests/services/auth-service.test.ts +315 -0
- package/tests/services/cookie-monitor.test.ts +229 -0
- package/tests/services/cookie-storage-service.test.ts +230 -0
- package/tests/services/gemini-client-wrapper.test.ts +688 -0
- package/tests/services/install-browser-service.test.ts +83 -0
- package/tests/services/playwright-cli-driver.test.ts +468 -0
- package/tests/services/profile-auth-manager.test.ts +334 -0
- package/tests/services/profile-service.test.ts +224 -0
- package/tests/setup.ts +95 -0
- package/tests/smoke/smoke.test.ts +52 -0
- package/tests/unit/config.test.ts +159 -0
- package/tests/unit/errors.test.ts +119 -0
- package/tests/unit/formatters.test.ts +316 -0
- package/tests/unit/mediator.test.ts +152 -0
- package/tests/unit/path-utils.test.ts +289 -0
- package/tsconfig.json +16 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: openspec-propose
|
|
3
|
+
description: Propose a new change with all artifacts generated in one step. Use when the user wants to quickly describe what they want to build and get a complete proposal with design, specs, and tasks ready for implementation.
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: Requires openspec CLI.
|
|
6
|
+
metadata:
|
|
7
|
+
author: openspec
|
|
8
|
+
version: "1.0"
|
|
9
|
+
generatedBy: "1.4.1"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
Propose a new change - create the change and generate all artifacts in one step.
|
|
13
|
+
|
|
14
|
+
I'll create a change with artifacts:
|
|
15
|
+
- proposal.md (what & why)
|
|
16
|
+
- design.md (how)
|
|
17
|
+
- tasks.md (implementation steps)
|
|
18
|
+
|
|
19
|
+
When ready to implement, run /opsx-apply
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
**Input**: The user's request should include a change name (kebab-case) OR a description of what they want to build.
|
|
24
|
+
|
|
25
|
+
**Steps**
|
|
26
|
+
|
|
27
|
+
1. **If no clear input provided, ask what they want to build**
|
|
28
|
+
|
|
29
|
+
Use the **AskUserQuestion tool** (open-ended, no preset options) to ask:
|
|
30
|
+
> "What change do you want to work on? Describe what you want to build or fix."
|
|
31
|
+
|
|
32
|
+
From their description, derive a kebab-case name (e.g., "add user authentication" → `add-user-auth`).
|
|
33
|
+
|
|
34
|
+
**IMPORTANT**: Do NOT proceed without understanding what the user wants to build.
|
|
35
|
+
|
|
36
|
+
2. **Create the change directory**
|
|
37
|
+
```bash
|
|
38
|
+
openspec new change "<name>"
|
|
39
|
+
```
|
|
40
|
+
This creates a scaffolded change in the planning home resolved by the CLI with `.openspec.yaml`.
|
|
41
|
+
|
|
42
|
+
3. **Get the artifact build order**
|
|
43
|
+
```bash
|
|
44
|
+
openspec status --change "<name>" --json
|
|
45
|
+
```
|
|
46
|
+
Parse the JSON to get:
|
|
47
|
+
- `applyRequires`: array of artifact IDs needed before implementation (e.g., `["tasks"]`)
|
|
48
|
+
- `artifacts`: list of all artifacts with their status and dependencies
|
|
49
|
+
- `planningHome`, `changeRoot`, `artifactPaths`, and `actionContext`: path and scope context. Use these instead of assuming repo-local paths.
|
|
50
|
+
|
|
51
|
+
4. **Create artifacts in sequence until apply-ready**
|
|
52
|
+
|
|
53
|
+
Use the **TodoWrite tool** to track progress through the artifacts.
|
|
54
|
+
|
|
55
|
+
Loop through artifacts in dependency order (artifacts with no pending dependencies first):
|
|
56
|
+
|
|
57
|
+
a. **For each artifact that is `ready` (dependencies satisfied)**:
|
|
58
|
+
- Get instructions:
|
|
59
|
+
```bash
|
|
60
|
+
openspec instructions <artifact-id> --change "<name>" --json
|
|
61
|
+
```
|
|
62
|
+
- The instructions JSON includes:
|
|
63
|
+
- `context`: Project background (constraints for you - do NOT include in output)
|
|
64
|
+
- `rules`: Artifact-specific rules (constraints for you - do NOT include in output)
|
|
65
|
+
- `template`: The structure to use for your output file
|
|
66
|
+
- `instruction`: Schema-specific guidance for this artifact type
|
|
67
|
+
- `resolvedOutputPath`: Resolved path or pattern to write the artifact
|
|
68
|
+
- `dependencies`: Completed artifacts to read for context
|
|
69
|
+
- Read any completed dependency files for context
|
|
70
|
+
- Create the artifact file using `template` as the structure and write it to `resolvedOutputPath`
|
|
71
|
+
- Apply `context` and `rules` as constraints - but do NOT copy them into the file
|
|
72
|
+
- Show brief progress: "Created <artifact-id>"
|
|
73
|
+
|
|
74
|
+
b. **Continue until all `applyRequires` artifacts are complete**
|
|
75
|
+
- After creating each artifact, re-run `openspec status --change "<name>" --json`
|
|
76
|
+
- Check if every artifact ID in `applyRequires` has `status: "done"` in the artifacts array
|
|
77
|
+
- Stop when all `applyRequires` artifacts are done
|
|
78
|
+
|
|
79
|
+
c. **If an artifact requires user input** (unclear context):
|
|
80
|
+
- Use **AskUserQuestion tool** to clarify
|
|
81
|
+
- Then continue with creation
|
|
82
|
+
|
|
83
|
+
5. **Show final status**
|
|
84
|
+
```bash
|
|
85
|
+
openspec status --change "<name>"
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
**Output**
|
|
89
|
+
|
|
90
|
+
After completing all artifacts, summarize:
|
|
91
|
+
- Change name and location
|
|
92
|
+
- List of artifacts created with brief descriptions
|
|
93
|
+
- What's ready: "All artifacts created! Ready for implementation."
|
|
94
|
+
- Prompt: "Run `/opsx-apply` or ask me to implement to start working on the tasks."
|
|
95
|
+
|
|
96
|
+
**Artifact Creation Guidelines**
|
|
97
|
+
|
|
98
|
+
- Follow the `instruction` field from `openspec instructions` for each artifact type
|
|
99
|
+
- The schema defines what each artifact should contain - follow it
|
|
100
|
+
- Read dependency artifacts for context before creating new ones
|
|
101
|
+
- Use `template` as the structure for your output file - fill in its sections
|
|
102
|
+
- **IMPORTANT**: `context` and `rules` are constraints for YOU, not content for the file
|
|
103
|
+
- Do NOT copy `<context>`, `<rules>`, `<project_context>` blocks into the artifact
|
|
104
|
+
- These guide what you write, but should never appear in the output
|
|
105
|
+
|
|
106
|
+
**Guardrails**
|
|
107
|
+
- Create ALL artifacts needed for implementation (as defined by schema's `apply.requires`)
|
|
108
|
+
- Always read dependency artifacts before creating a new one
|
|
109
|
+
- If context is critically unclear, ask the user - but prefer making reasonable decisions to keep momentum
|
|
110
|
+
- If a change with that name already exists, ask if user wants to continue it or create a new one
|
|
111
|
+
- Verify each artifact file exists after writing before proceeding to next
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: openspec-sync-specs
|
|
3
|
+
description: Sync delta specs from a change to main specs. Use when the user wants to update main specs with changes from a delta spec, without archiving the change.
|
|
4
|
+
license: MIT
|
|
5
|
+
compatibility: Requires openspec CLI.
|
|
6
|
+
metadata:
|
|
7
|
+
author: openspec
|
|
8
|
+
version: "1.0"
|
|
9
|
+
generatedBy: "1.4.1"
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
Sync delta specs from a change to main specs.
|
|
13
|
+
|
|
14
|
+
This is an **agent-driven** operation - you will read delta specs and directly edit main specs to apply the changes. This allows intelligent merging (e.g., adding a scenario without copying the entire requirement).
|
|
15
|
+
|
|
16
|
+
**Input**: Optionally specify a change name. If omitted, check if it can be inferred from conversation context. If vague or ambiguous you MUST prompt for available changes.
|
|
17
|
+
|
|
18
|
+
**Steps**
|
|
19
|
+
|
|
20
|
+
1. **If no change name provided, prompt for selection**
|
|
21
|
+
|
|
22
|
+
Run `openspec list --json` to get available changes. Use the **AskUserQuestion tool** to let the user select.
|
|
23
|
+
|
|
24
|
+
Show changes that have delta specs (under `specs/` directory).
|
|
25
|
+
|
|
26
|
+
**IMPORTANT**: Do NOT guess or auto-select a change. Always let the user choose.
|
|
27
|
+
|
|
28
|
+
2. **Resolve change context**
|
|
29
|
+
|
|
30
|
+
Run:
|
|
31
|
+
```bash
|
|
32
|
+
openspec status --change "<name>" --json
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
If status reports `actionContext.mode: "workspace-planning"`, explain that workspace spec sync is not supported in this slice and STOP. Do not fall back to repo-local paths or edit linked repos.
|
|
36
|
+
|
|
37
|
+
3. **Find delta specs**
|
|
38
|
+
|
|
39
|
+
Use `artifactPaths.specs.existingOutputPaths` from the status JSON as the list of delta spec files.
|
|
40
|
+
|
|
41
|
+
Each delta spec file contains sections like:
|
|
42
|
+
- `## ADDED Requirements` - New requirements to add
|
|
43
|
+
- `## MODIFIED Requirements` - Changes to existing requirements
|
|
44
|
+
- `## REMOVED Requirements` - Requirements to remove
|
|
45
|
+
- `## RENAMED Requirements` - Requirements to rename (FROM:/TO: format)
|
|
46
|
+
|
|
47
|
+
If no delta specs found, inform user and stop.
|
|
48
|
+
|
|
49
|
+
4. **For each delta spec, apply changes to main specs**
|
|
50
|
+
|
|
51
|
+
For each repo-local capability delta spec path returned by the CLI:
|
|
52
|
+
|
|
53
|
+
a. **Read the delta spec** to understand the intended changes
|
|
54
|
+
|
|
55
|
+
b. **Read the main spec** at `openspec/specs/<capability>/spec.md` (may not exist yet)
|
|
56
|
+
|
|
57
|
+
c. **Apply changes intelligently**:
|
|
58
|
+
|
|
59
|
+
**ADDED Requirements:**
|
|
60
|
+
- If requirement doesn't exist in main spec → add it
|
|
61
|
+
- If requirement already exists → update it to match (treat as implicit MODIFIED)
|
|
62
|
+
|
|
63
|
+
**MODIFIED Requirements:**
|
|
64
|
+
- Find the requirement in main spec
|
|
65
|
+
- Apply the changes - this can be:
|
|
66
|
+
- Adding new scenarios (don't need to copy existing ones)
|
|
67
|
+
- Modifying existing scenarios
|
|
68
|
+
- Changing the requirement description
|
|
69
|
+
- Preserve scenarios/content not mentioned in the delta
|
|
70
|
+
|
|
71
|
+
**REMOVED Requirements:**
|
|
72
|
+
- Remove the entire requirement block from main spec
|
|
73
|
+
|
|
74
|
+
**RENAMED Requirements:**
|
|
75
|
+
- Find the FROM requirement, rename to TO
|
|
76
|
+
|
|
77
|
+
d. **Create new main spec** if capability doesn't exist yet:
|
|
78
|
+
- Create `openspec/specs/<capability>/spec.md`
|
|
79
|
+
- Add Purpose section (can be brief, mark as TBD)
|
|
80
|
+
- Add Requirements section with the ADDED requirements
|
|
81
|
+
|
|
82
|
+
5. **Show summary**
|
|
83
|
+
|
|
84
|
+
After applying all changes, summarize:
|
|
85
|
+
- Which capabilities were updated
|
|
86
|
+
- What changes were made (requirements added/modified/removed/renamed)
|
|
87
|
+
|
|
88
|
+
**Delta Spec Format Reference**
|
|
89
|
+
|
|
90
|
+
```markdown
|
|
91
|
+
## ADDED Requirements
|
|
92
|
+
|
|
93
|
+
### Requirement: New Feature
|
|
94
|
+
The system SHALL do something new.
|
|
95
|
+
|
|
96
|
+
#### Scenario: Basic case
|
|
97
|
+
- **WHEN** user does X
|
|
98
|
+
- **THEN** system does Y
|
|
99
|
+
|
|
100
|
+
## MODIFIED Requirements
|
|
101
|
+
|
|
102
|
+
### Requirement: Existing Feature
|
|
103
|
+
#### Scenario: New scenario to add
|
|
104
|
+
- **WHEN** user does A
|
|
105
|
+
- **THEN** system does B
|
|
106
|
+
|
|
107
|
+
## REMOVED Requirements
|
|
108
|
+
|
|
109
|
+
### Requirement: Deprecated Feature
|
|
110
|
+
|
|
111
|
+
## RENAMED Requirements
|
|
112
|
+
|
|
113
|
+
- FROM: `### Requirement: Old Name`
|
|
114
|
+
- TO: `### Requirement: New Name`
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**Key Principle: Intelligent Merging**
|
|
118
|
+
|
|
119
|
+
Unlike programmatic merging, you can apply **partial updates**:
|
|
120
|
+
- To add a scenario, just include that scenario under MODIFIED - don't copy existing scenarios
|
|
121
|
+
- The delta represents *intent*, not a wholesale replacement
|
|
122
|
+
- Use your judgment to merge changes sensibly
|
|
123
|
+
|
|
124
|
+
**Output On Success**
|
|
125
|
+
|
|
126
|
+
```
|
|
127
|
+
## Specs Synced: <change-name>
|
|
128
|
+
|
|
129
|
+
Updated main specs:
|
|
130
|
+
|
|
131
|
+
**<capability-1>**:
|
|
132
|
+
- Added requirement: "New Feature"
|
|
133
|
+
- Modified requirement: "Existing Feature" (added 1 scenario)
|
|
134
|
+
|
|
135
|
+
**<capability-2>**:
|
|
136
|
+
- Created new spec file
|
|
137
|
+
- Added requirement: "Another Feature"
|
|
138
|
+
|
|
139
|
+
Main specs are now updated. The change remains active - archive when implementation is complete.
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**Guardrails**
|
|
143
|
+
- Read both delta and main specs before making changes
|
|
144
|
+
- Preserve existing content not mentioned in delta
|
|
145
|
+
- If something is unclear, ask for clarification
|
|
146
|
+
- Show what you're changing as you go
|
|
147
|
+
- The operation should be idempotent - running twice should give same result
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
# the name by which the project can be referenced within Serena
|
|
2
|
+
project_name: "gemiterm-bun-rewrite"
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
# list of languages for which language servers are started; choose from:
|
|
6
|
+
# al angular ansible bash clojure
|
|
7
|
+
# cpp cpp_ccls crystal csharp csharp_omnisharp
|
|
8
|
+
# dart elixir elm erlang fortran
|
|
9
|
+
# fsharp go groovy haskell haxe
|
|
10
|
+
# hlsl html java json julia
|
|
11
|
+
# kotlin lean4 lua luau markdown
|
|
12
|
+
# matlab msl nix ocaml pascal
|
|
13
|
+
# perl php php_phpactor powershell python
|
|
14
|
+
# python_jedi python_ty r rego ruby
|
|
15
|
+
# ruby_solargraph rust scala scss solidity
|
|
16
|
+
# svelte swift systemverilog terraform toml
|
|
17
|
+
# typescript typescript_vts vue yaml zig
|
|
18
|
+
# (This list may be outdated. For the current list, see values of Language enum here:
|
|
19
|
+
# https://github.com/oraios/serena/blob/main/src/solidlsp/ls_config.py
|
|
20
|
+
# For some languages, there are alternative language servers, e.g. csharp_omnisharp, ruby_solargraph.)
|
|
21
|
+
# Note:
|
|
22
|
+
# - For C, use cpp
|
|
23
|
+
# - For JavaScript, use typescript
|
|
24
|
+
# - For Angular projects, use angular (subsumes typescript+html; requires `npm install` in the project root)
|
|
25
|
+
# - For Svelte projects, use svelte (subsumes typescript/javascript for .svelte projects; requires npm)
|
|
26
|
+
# - For SCSS / Sass / plain CSS, use scss (some-sass-language-server handles all three)
|
|
27
|
+
# - For Free Pascal/Lazarus, use pascal
|
|
28
|
+
# Special requirements:
|
|
29
|
+
# Some languages require additional setup/installations.
|
|
30
|
+
# See here for details: https://oraios.github.io/serena/01-about/020_programming-languages.html#language-servers
|
|
31
|
+
# When using multiple languages, the first language server that supports a given file will be used for that file.
|
|
32
|
+
# The first language is the default language and the respective language server will be used as a fallback.
|
|
33
|
+
# Note that when using the JetBrains backend, language servers are not used and this list is correspondingly ignored.
|
|
34
|
+
languages:
|
|
35
|
+
- typescript
|
|
36
|
+
|
|
37
|
+
# the encoding used by text files in the project
|
|
38
|
+
# For a list of possible encodings, see https://docs.python.org/3.11/library/codecs.html#standard-encodings
|
|
39
|
+
encoding: "utf-8"
|
|
40
|
+
|
|
41
|
+
# line ending convention to use when writing source files.
|
|
42
|
+
# Possible values: unset (use global setting), "lf", "crlf", or "native" (platform default)
|
|
43
|
+
# This does not affect Serena's own files (e.g. memories and configuration files), which always use native line endings.
|
|
44
|
+
line_ending:
|
|
45
|
+
|
|
46
|
+
# The language backend to use for this project.
|
|
47
|
+
# If not set, the global setting from serena_config.yml is used.
|
|
48
|
+
# Valid values: LSP, JetBrains
|
|
49
|
+
# Note: the backend is fixed at startup. If a project with a different backend
|
|
50
|
+
# is activated post-init, an error will be returned.
|
|
51
|
+
language_backend:
|
|
52
|
+
|
|
53
|
+
# whether to use project's .gitignore files to ignore files
|
|
54
|
+
ignore_all_files_in_gitignore: true
|
|
55
|
+
|
|
56
|
+
# advanced configuration option allowing to configure language server-specific options.
|
|
57
|
+
# Maps the language key to the options.
|
|
58
|
+
# Have a look at the docstring of the constructors of the LS implementations within solidlsp (e.g., for C# or PHP) to see which options are available.
|
|
59
|
+
# No documentation on options means no options are available.
|
|
60
|
+
ls_specific_settings: {}
|
|
61
|
+
|
|
62
|
+
# list of additional workspace folder paths for cross-package reference support (e.g. in monorepos).
|
|
63
|
+
# Paths can be absolute or relative to the project root.
|
|
64
|
+
# Each folder is registered as an LSP workspace folder, enabling language servers to discover
|
|
65
|
+
# symbols and references across package boundaries.
|
|
66
|
+
# Currently supported for: TypeScript.
|
|
67
|
+
# Example:
|
|
68
|
+
# additional_workspace_folders:
|
|
69
|
+
# - ../sibling-package
|
|
70
|
+
# - ../shared-lib
|
|
71
|
+
additional_workspace_folders: []
|
|
72
|
+
|
|
73
|
+
# list of additional paths to ignore in this project.
|
|
74
|
+
# Same syntax as gitignore, so you can use * and **.
|
|
75
|
+
# Note: global ignored_paths from serena_config.yml are also applied additively.
|
|
76
|
+
ignored_paths: []
|
|
77
|
+
|
|
78
|
+
# whether the project is in read-only mode
|
|
79
|
+
# If set to true, all editing tools will be disabled and attempts to use them will result in an error
|
|
80
|
+
# Added on 2025-04-18
|
|
81
|
+
read_only: false
|
|
82
|
+
|
|
83
|
+
# list of tool names to exclude.
|
|
84
|
+
# This extends the existing exclusions (e.g. from the global configuration)
|
|
85
|
+
# Find the list of tools here: https://oraios.github.io/serena/01-about/035_tools.html
|
|
86
|
+
excluded_tools: []
|
|
87
|
+
|
|
88
|
+
# list of tools to include that would otherwise be disabled (particularly optional tools that are disabled by default).
|
|
89
|
+
# This extends the existing inclusions (e.g. from the global configuration).
|
|
90
|
+
# Find the list of tools here: https://oraios.github.io/serena/01-about/035_tools.html
|
|
91
|
+
included_optional_tools: []
|
|
92
|
+
|
|
93
|
+
# fixed set of tools to use as the base tool set (if non-empty), replacing Serena's default set of tools.
|
|
94
|
+
# This cannot be combined with non-empty excluded_tools or included_optional_tools.
|
|
95
|
+
# Find the list of tools here: https://oraios.github.io/serena/01-about/035_tools.html
|
|
96
|
+
fixed_tools: []
|
|
97
|
+
|
|
98
|
+
# list of mode names that are to be activated by default, overriding the setting in the global configuration.
|
|
99
|
+
# The full set of modes to be activated is base_modes (from global config) + default_modes + added_modes.
|
|
100
|
+
# If the setting is undefined/empty, the default_modes from the global configuration (serena_config.yml) apply.
|
|
101
|
+
# Otherwise, this overrides the setting from the global configuration (serena_config.yml).
|
|
102
|
+
# Therefore, you can set this to [] if you do not want the default modes defined in the global config to apply
|
|
103
|
+
# for this project.
|
|
104
|
+
# This setting can, in turn, be overridden by CLI parameters (--mode).
|
|
105
|
+
# See https://oraios.github.io/serena/02-usage/050_configuration.html#modes
|
|
106
|
+
default_modes:
|
|
107
|
+
|
|
108
|
+
# list of mode names to be activated additionally for this project, e.g. ["query-projects"]
|
|
109
|
+
# The full set of modes to be activated is base_modes (from global config) + default_modes + added_modes.
|
|
110
|
+
# See https://oraios.github.io/serena/02-usage/050_configuration.html#modes
|
|
111
|
+
added_modes:
|
|
112
|
+
|
|
113
|
+
# initial prompt for the project. It will always be given to the LLM upon activating the project
|
|
114
|
+
# (contrary to the memories, which are loaded on demand).
|
|
115
|
+
initial_prompt: ""
|
|
116
|
+
|
|
117
|
+
# time budget (seconds) per tool call for the retrieval of additional symbol information
|
|
118
|
+
# such as docstrings or parameter information.
|
|
119
|
+
# This overrides the corresponding setting in the global configuration; see the documentation there.
|
|
120
|
+
# If null or missing, use the setting from the global configuration.
|
|
121
|
+
symbol_info_budget:
|
|
122
|
+
|
|
123
|
+
# list of regex patterns which, when matched, mark a memory entry as read‑only.
|
|
124
|
+
# Extends the list from the global configuration, merging the two lists.
|
|
125
|
+
read_only_memory_patterns: []
|
|
126
|
+
|
|
127
|
+
# list of regex patterns for memories to completely ignore.
|
|
128
|
+
# Matching memories will not appear in list_memories or activate_project output
|
|
129
|
+
# and cannot be accessed via read_memory or write_memory.
|
|
130
|
+
# To access ignored memory files, use the read_file tool on the raw file path.
|
|
131
|
+
# Extends the list from the global configuration, merging the two lists.
|
|
132
|
+
# Example: ["_archive/.*", "_episodes/.*"]
|
|
133
|
+
ignored_memory_patterns: []
|
package/AGENTS.md
ADDED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
# GemiTerm Agent Guide (Bun Rewrite)
|
|
2
|
+
|
|
3
|
+
Context for AI assistants and human contributors working in this repository.
|
|
4
|
+
This file is the **persistent project context**; the per-session **goal** is supplied
|
|
5
|
+
in the user message and is intentionally not duplicated here.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## What this project is
|
|
10
|
+
|
|
11
|
+
A Bun-native TypeScript rewrite of **gemiterm**, a CLI for Google's Gemini web app.
|
|
12
|
+
This rewrite will be released as **v2.0.0** and will replace the Python v1.4.1
|
|
13
|
+
implementation currently published from `Expert-Vision-Software/gemiterm`.
|
|
14
|
+
|
|
15
|
+
- **Upstream repo (reference only):** https://github.com/Expert-Vision-Software/gemiterm
|
|
16
|
+
- **Local clone of upstream (Python v1.4.1 source, reference only):**
|
|
17
|
+
`C:\dev\projects\github\webgemini-cli\`
|
|
18
|
+
- **This repo (Bun rewrite, the v2.0.0 target):** `C:\dev\projects\github\gemiterm-bun-rewrite\`
|
|
19
|
+
- **Active branch:** `gemiterm-bun-rewrite`
|
|
20
|
+
- **Status:** functionally complete (432/432 tests pass, 11 CLI commands
|
|
21
|
+
registered, auth flow working). CI/release pipeline is captured in the
|
|
22
|
+
`cross-platform-build-and-ci` OpenSpec change and is **not yet implemented in code** —
|
|
23
|
+
only the OpenSpec artifact is on disk (`openspec/changes/cross-platform-build-and-ci/`).
|
|
24
|
+
|
|
25
|
+
## Goal & design intent
|
|
26
|
+
|
|
27
|
+
The goal of **each work session** is supplied in the user message — read it there.
|
|
28
|
+
|
|
29
|
+
Standing design intent (does not change session to session):
|
|
30
|
+
|
|
31
|
+
- **Functional parity with the Python v1.4.1 implementation** is the baseline.
|
|
32
|
+
- **Explicit deviation:** browser launch and automation go through the
|
|
33
|
+
`playwright-cli` subprocess (`@playwright/cli` on npm), not the
|
|
34
|
+
Python `playwright` SDK. This means some of the cross-platform browser
|
|
35
|
+
detection the Python code carried is no longer ours to do — `playwright-cli`
|
|
36
|
+
handles its own browser install (`playwright-cli install chromium`),
|
|
37
|
+
its own browser selection (`--browser=chromium|chrome|msedge|firefox|webkit`),
|
|
38
|
+
and its own CDP attach (`--cdp=`).
|
|
39
|
+
- **Seamless v1.4.1 → v2.0.0 upgrade** is required: the v2.0.0 binary must
|
|
40
|
+
read the existing `%APPDATA%\gemiterm\` (Windows) / `~/gemiterm/`
|
|
41
|
+
(POSIX) config dir unchanged, and the new `install.ps1`/`install.sh` must
|
|
42
|
+
replace the v1.4.1 installer in place. This is captured in the
|
|
43
|
+
`v2-install-migration` OpenSpec change.
|
|
44
|
+
|
|
45
|
+
## Sensitive area — do not modify lightly
|
|
46
|
+
|
|
47
|
+
We troubleshooted and fixed a specific issue with **subprocess spawning and
|
|
48
|
+
capturing authentication cookies** through `playwright-cli`. The fix landed in
|
|
49
|
+
commits `4bc4de8` and `0ec3682`. The following files are the working
|
|
50
|
+
implementation and must be treated as a regression-test gate:
|
|
51
|
+
|
|
52
|
+
- `src/services/playwright-cli-driver.ts` — subprocess runner, argv builder,
|
|
53
|
+
cookie-list output parser. Owns the `BunPlaywrightRunner` and
|
|
54
|
+
`PlaywrightRunner` interface.
|
|
55
|
+
- `src/services/cookie-monitor.ts` — login-detection polling loop. Uses the
|
|
56
|
+
sign-out link probe (`e4d1fef`), not a textarea/URL check.
|
|
57
|
+
- `src/services/auth-service.ts` — orchestrates `playwright-cli-driver` +
|
|
58
|
+
`cookie-monitor` for the `auth` command flow.
|
|
59
|
+
- `src/services/cookie-storage-service.ts` — 7-day freshness window, composes
|
|
60
|
+
`CookieStorage` via DI.
|
|
61
|
+
|
|
62
|
+
If any change touches these files, the full test suite must pass
|
|
63
|
+
(`bun run test` — 432/432 baseline) and the affected service-level tests
|
|
64
|
+
(`tests/services/playwright-cli-driver.test.ts`,
|
|
65
|
+
`tests/services/cookie-monitor.test.ts`,
|
|
66
|
+
`tests/services/auth-service.test.ts`,
|
|
67
|
+
`tests/services/cookie-storage-service.test.ts`) must be inspected manually.
|
|
68
|
+
|
|
69
|
+
## Tooling
|
|
70
|
+
|
|
71
|
+
- **openspec CLI** — used per the `openspec-*` skills for proposing, applying,
|
|
72
|
+
syncing, and archiving OpenSpec changes. The change artifacts in
|
|
73
|
+
`openspec/changes/` are the source of truth for pending work; the
|
|
74
|
+
committed specs in `openspec/specs/` describe the current state.
|
|
75
|
+
- **deepwiki** — for any GitHub link mentioned in context or any third-party
|
|
76
|
+
library reference (e.g. `@playwright/cli`, `bun build`).
|
|
77
|
+
- **plannotator** — `submit_plan` is for **action plans** that the user will
|
|
78
|
+
execute. Not for plans that themselves produce further plans.
|
|
79
|
+
- **serena** — preferred for code exploration and editing. Use serena
|
|
80
|
+
`find_symbol`, `find_file`, `search_for_pattern`, `read_file`, `replace_*`
|
|
81
|
+
before falling back to `grep`/`glob`/`read`/`edit`.
|
|
82
|
+
- **bash** — PowerShell 7+ (`pwsh`) on Windows. Use the `workdir` parameter
|
|
83
|
+
instead of `cd`; do not change directories inside a command.
|
|
84
|
+
|
|
85
|
+
## How to work
|
|
86
|
+
|
|
87
|
+
- Default to **delegating to subagents**; behave as a master coordinator.
|
|
88
|
+
Batch work into **sequential** chains (when output feeds the next step)
|
|
89
|
+
and **parallel** batches (when investigations are independent).
|
|
90
|
+
- **Run `bun run test` after any non-trivial change** and confirm it stays
|
|
91
|
+
at the 432/432 baseline.
|
|
92
|
+
- **Commit frequently** with conventional-commit messages. **Never push.**
|
|
93
|
+
- The OpenSpec proposal/design/tasks artifacts in
|
|
94
|
+
`openspec/changes/<change-name>/` are documentation, not implementation.
|
|
95
|
+
They describe what to build; the build is done by a follow-up
|
|
96
|
+
implementation pass that the OpenSpec change's `tasks.md` tracks.
|
|
97
|
+
- Read `openspec/MAESTRO_MIGRATION.md` before proposing new work — it maps
|
|
98
|
+
the original Python → Bun migration tasks to current status and to the
|
|
99
|
+
specific OpenSpec change that handles any remaining work.
|
|
100
|
+
|
|
101
|
+
## Code conventions
|
|
102
|
+
|
|
103
|
+
- **Path and file operations are mandatory mediation.** No file in `src/`
|
|
104
|
+
outside `src/infrastructure/path-utils.ts`, `src/infrastructure/io.ts`,
|
|
105
|
+
and `src/services/install-browser-service.ts` may import from
|
|
106
|
+
`node:fs`, `node:path`, or `node:os`. The lint script
|
|
107
|
+
`scripts/lint-path-mediation.{sh,ps1}` (also exposed as
|
|
108
|
+
`bun run lint:mediation`) enforces this. If you need a new path or
|
|
109
|
+
file-system helper, add it to the right module first and consume it
|
|
110
|
+
from there — do not bypass the mediation.
|
|
111
|
+
- **All new file-system operations go through `io.ts`.** Use
|
|
112
|
+
`writeTextFile` / `readTextFile` / `readJsonFile` / `writeJsonFile` /
|
|
113
|
+
`ensureDir` / `existsFile` / `removeDir` / `renameDir` /
|
|
114
|
+
`isDirectory` / `listSubdirectories` / `safeReadTextFile`. New
|
|
115
|
+
functions should be added only when at least 2 call sites need them.
|
|
116
|
+
- **All new path operations go through `path-utils.ts`.** Use
|
|
117
|
+
`resolvePath`, `joinPath`, `dirnamePath`, `getConfigDir`,
|
|
118
|
+
`getProfilesDir`, `getProfilePath`, `getProfileDir`,
|
|
119
|
+
`getDefaultProfileMarkerPath`, `isWSL`, `getProjectRoot`, or
|
|
120
|
+
`getPackageJson`. Do not call `node:path` directly.
|
|
121
|
+
- **Errors from `io.ts` throw `IOError`** with a `cause` field for the
|
|
122
|
+
original error. Do not catch and re-throw the raw `node:fs` error.
|
|
123
|
+
|
|
124
|
+
## Repo hygiene
|
|
125
|
+
|
|
126
|
+
These items are tracked in the `cross-platform-build-and-ci` change's tasks:
|
|
127
|
+
|
|
128
|
+
- Orphan file literally named `{` at the repo root.
|
|
129
|
+
- Stray bare `{` line in `.gitignore:23`.
|
|
130
|
+
- Unused `commander@^15.0.0` in `package.json:29` (the CLI uses hand-rolled
|
|
131
|
+
argv parsing; `commander` is installed but never imported).
|
|
132
|
+
- Empty `src/commands/` placeholder containing only `.gitkeep`.
|
|
133
|
+
- `bun run build` is broken on Bun 1.3.x (`--compile` no longer accepts
|
|
134
|
+
`--outdir`).
|
|
135
|
+
|
|
136
|
+
|
package/CHANGELOG.md
ADDED