gemiterm 2.0.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/README.md +32 -9
  2. package/package.json +13 -4
  3. package/src/cli/command-registry.ts +66 -62
  4. package/src/cli/commands/continue-command.ts +75 -1
  5. package/src/cli/commands/install-skills-command.ts +35 -0
  6. package/src/cli/commands/new-command.ts +62 -0
  7. package/src/cli/index.ts +19 -44
  8. package/src/cli/utils/long-arg-guard.ts +28 -0
  9. package/src/cli/utils/prompt-file.ts +26 -0
  10. package/src/infrastructure/cli-parser.ts +77 -0
  11. package/src/infrastructure/io.ts +9 -0
  12. package/src/services/skills-cli-driver.ts +58 -0
  13. package/src/services/skills-service.ts +52 -0
  14. package/.env +0 -2
  15. package/.github/workflows/manual-release.yml +0 -34
  16. package/.github/workflows/release.yml +0 -198
  17. package/.github/workflows/test.yml +0 -29
  18. package/.opencode/commands/opsx-apply.md +0 -152
  19. package/.opencode/commands/opsx-archive.md +0 -157
  20. package/.opencode/commands/opsx-explore.md +0 -169
  21. package/.opencode/commands/opsx-propose.md +0 -104
  22. package/.opencode/commands/opsx-sync.md +0 -140
  23. package/.opencode/commands/search-intelligently.md +0 -9
  24. package/.opencode/opencode.json +0 -20
  25. package/.opencode/skills/intellisearch/.version +0 -1
  26. package/.opencode/skills/intellisearch/SKILL.md +0 -84
  27. package/.opencode/skills/intellisearch/references/brave-search.md +0 -67
  28. package/.opencode/skills/intellisearch/references/ddg-search.md +0 -79
  29. package/.opencode/skills/intellisearch/references/deepwiki-tools.md +0 -246
  30. package/.opencode/skills/intellisearch/references/examples.md +0 -97
  31. package/.opencode/skills/intellisearch/references/gh-cli.md +0 -143
  32. package/.opencode/skills/intellisearch/references/google-search.md +0 -40
  33. package/.opencode/skills/intellisearch/references/search-workflow.md +0 -143
  34. package/.opencode/skills/intellisearch/references/workflow.md +0 -115
  35. package/.opencode/skills/openspec-apply-change/SKILL.md +0 -159
  36. package/.opencode/skills/openspec-archive-change/SKILL.md +0 -117
  37. package/.opencode/skills/openspec-explore/SKILL.md +0 -287
  38. package/.opencode/skills/openspec-propose/SKILL.md +0 -111
  39. package/.opencode/skills/openspec-sync-specs/SKILL.md +0 -147
  40. package/.serena/project.yml +0 -133
  41. package/AGENTS.md +0 -136
  42. package/CHANGELOG.md +0 -3
  43. package/bun.lock +0 -105
  44. package/docs/INSTALL.md +0 -185
  45. package/docs/PLAYWRIGHT_CLI_API.md +0 -306
  46. package/docs/python-release-for-reference.md +0 -175
  47. package/examples/sample_json_export.json +0 -32
  48. package/examples/sample_markdown_export.md +0 -221
  49. package/examples/usage_examples.sh +0 -222
  50. package/install.ps1 +0 -264
  51. package/install.sh +0 -275
  52. package/openspec/MAESTRO_MIGRATION.md +0 -180
  53. package/openspec/changes/archive/2026-06-08-command-spec-conformance/.openspec.yaml +0 -2
  54. package/openspec/changes/archive/2026-06-08-command-spec-conformance/design.md +0 -194
  55. package/openspec/changes/archive/2026-06-08-command-spec-conformance/proposal.md +0 -52
  56. package/openspec/changes/archive/2026-06-08-command-spec-conformance/specs/multi-profile-conversations/spec.md +0 -133
  57. package/openspec/changes/archive/2026-06-08-command-spec-conformance/tasks.md +0 -95
  58. package/openspec/changes/archive/2026-06-09-refactor-interactive-prompt-loop/.openspec.yaml +0 -2
  59. package/openspec/changes/archive/2026-06-09-refactor-interactive-prompt-loop/design.md +0 -28
  60. package/openspec/changes/archive/2026-06-09-refactor-interactive-prompt-loop/proposal.md +0 -22
  61. package/openspec/changes/archive/2026-06-09-refactor-interactive-prompt-loop/specs/interactive-prompt-loop/spec.md +0 -35
  62. package/openspec/changes/archive/2026-06-09-refactor-interactive-prompt-loop/tasks.md +0 -28
  63. package/openspec/changes/archive/2026-06-09-replace-gemini-api-placeholder-with-gemini-reverse/.openspec.yaml +0 -2
  64. package/openspec/changes/archive/2026-06-09-replace-gemini-api-placeholder-with-gemini-reverse/design.md +0 -323
  65. package/openspec/changes/archive/2026-06-09-replace-gemini-api-placeholder-with-gemini-reverse/proposal.md +0 -122
  66. package/openspec/changes/archive/2026-06-09-replace-gemini-api-placeholder-with-gemini-reverse/specs/no-capability-changes/spec.md +0 -29
  67. package/openspec/changes/archive/2026-06-09-replace-gemini-api-placeholder-with-gemini-reverse/tasks.md +0 -172
  68. package/openspec/changes/archive/2026-06-09-v2-install-migration/.openspec.yaml +0 -2
  69. package/openspec/changes/archive/2026-06-09-v2-install-migration/design.md +0 -241
  70. package/openspec/changes/archive/2026-06-09-v2-install-migration/proposal.md +0 -41
  71. package/openspec/changes/archive/2026-06-09-v2-install-migration/specs/v2-installer/spec.md +0 -205
  72. package/openspec/changes/archive/2026-06-09-v2-install-migration/tasks.md +0 -97
  73. package/openspec/changes/commander-cli-parser/.openspec.yaml +0 -2
  74. package/openspec/changes/commander-cli-parser/design.md +0 -107
  75. package/openspec/changes/commander-cli-parser/proposal.md +0 -31
  76. package/openspec/changes/commander-cli-parser/specs/cli/spec.md +0 -48
  77. package/openspec/changes/commander-cli-parser/tasks.md +0 -33
  78. package/openspec/changes/cross-platform-build-and-ci/.openspec.yaml +0 -2
  79. package/openspec/changes/cross-platform-build-and-ci/design.md +0 -213
  80. package/openspec/changes/cross-platform-build-and-ci/proposal.md +0 -50
  81. package/openspec/changes/cross-platform-build-and-ci/specs/path-and-file-mediation/spec.md +0 -335
  82. package/openspec/changes/cross-platform-build-and-ci/specs/release-pipeline/spec.md +0 -95
  83. package/openspec/changes/cross-platform-build-and-ci/tasks.md +0 -164
  84. package/openspec/config.yaml +0 -20
  85. package/openspec/specs/auth/spec.md +0 -394
  86. package/openspec/specs/cli/spec.md +0 -108
  87. package/openspec/specs/commands/spec.md +0 -409
  88. package/openspec/specs/configuration/spec.md +0 -130
  89. package/openspec/specs/conversations/spec.md +0 -139
  90. package/openspec/specs/domain-model/spec.md +0 -128
  91. package/openspec/specs/formatters/spec.md +0 -158
  92. package/openspec/specs/install-browser/spec.md +0 -146
  93. package/openspec/specs/interactive-prompt-loop/spec.md +0 -41
  94. package/openspec/specs/logger/spec.md +0 -71
  95. package/openspec/specs/mediator/spec.md +0 -72
  96. package/openspec/specs/multi-profile-conversations/spec.md +0 -145
  97. package/openspec/specs/path-utils/spec.md +0 -101
  98. package/openspec/specs/profiles/spec.md +0 -94
  99. package/openspec/specs/storage/spec.md +0 -198
  100. package/openspec/specs/testing/spec.md +0 -237
  101. package/openspec/specs/v2-installer/spec.md +0 -205
  102. package/openspec/specs/validators/spec.md +0 -65
  103. package/scripts/build.ts +0 -88
  104. package/scripts/clean-build.ps1 +0 -4
  105. package/scripts/clean-build.sh +0 -5
  106. package/scripts/install-browser.ps1 +0 -5
  107. package/scripts/install-browser.sh +0 -6
  108. package/scripts/lint-path-mediation.ps1 +0 -65
  109. package/scripts/lint-path-mediation.sh +0 -40
  110. package/tests/cli/auth-command.test.ts +0 -220
  111. package/tests/cli/command-registry.test.ts +0 -67
  112. package/tests/cli/continue-command.test.ts +0 -100
  113. package/tests/cli/delete-command.test.ts +0 -128
  114. package/tests/cli/export-all-command.test.ts +0 -375
  115. package/tests/cli/install-browser-command.test.ts +0 -48
  116. package/tests/cli/list-command.test.ts +0 -179
  117. package/tests/cli/new-command.test.ts +0 -139
  118. package/tests/cli/status-command.test.ts +0 -106
  119. package/tests/core/query-handlers.test.ts +0 -187
  120. package/tests/fixtures/auth-fixtures.ts +0 -98
  121. package/tests/fixtures/chat-fixtures.ts +0 -87
  122. package/tests/infrastructure/cli-table.test.ts +0 -107
  123. package/tests/infrastructure/formatters.test.ts +0 -202
  124. package/tests/infrastructure/io.test.ts +0 -197
  125. package/tests/infrastructure/logger.test.ts +0 -74
  126. package/tests/infrastructure/storage.test.ts +0 -335
  127. package/tests/infrastructure/validators.test.ts +0 -67
  128. package/tests/integration/commands/auth.test.ts +0 -186
  129. package/tests/integration/commands/continue.test.ts +0 -130
  130. package/tests/integration/commands/delete.test.ts +0 -140
  131. package/tests/integration/commands/export.test.ts +0 -266
  132. package/tests/integration/commands/fetch.test.ts +0 -238
  133. package/tests/integration/commands/list.test.ts +0 -281
  134. package/tests/integration/commands/profile.test.ts +0 -258
  135. package/tests/integration/commands/status.test.ts +0 -223
  136. package/tests/integration/installer-script-shape.test.ts +0 -67
  137. package/tests/parity/compare-outputs.ts +0 -359
  138. package/tests/parity/test-commands-parity.ps1 +0 -82
  139. package/tests/parity/test-commands-parity.sh +0 -61
  140. package/tests/services/auth-service.test.ts +0 -315
  141. package/tests/services/cookie-monitor.test.ts +0 -229
  142. package/tests/services/cookie-storage-service.test.ts +0 -230
  143. package/tests/services/gemini-client-wrapper.test.ts +0 -688
  144. package/tests/services/install-browser-service.test.ts +0 -83
  145. package/tests/services/playwright-cli-driver.test.ts +0 -468
  146. package/tests/services/profile-auth-manager.test.ts +0 -334
  147. package/tests/services/profile-service.test.ts +0 -224
  148. package/tests/setup.ts +0 -95
  149. package/tests/smoke/smoke.test.ts +0 -52
  150. package/tests/unit/config.test.ts +0 -159
  151. package/tests/unit/errors.test.ts +0 -119
  152. package/tests/unit/formatters.test.ts +0 -316
  153. package/tests/unit/mediator.test.ts +0 -152
  154. package/tests/unit/path-utils.test.ts +0 -289
  155. package/tsconfig.json +0 -16
@@ -1,230 +0,0 @@
1
- import { describe, test, expect, beforeEach, afterEach, mock } from "bun:test";
2
- import { CookieStorageService } from "../../src/services/cookie-storage-service.ts";
3
- import { Logger } from "../../src/infrastructure/logger.ts";
4
- import type { Cookie } from "../../src/core/types.ts";
5
- import type { CookieStorage } from "../../src/infrastructure/storage.ts";
6
-
7
- function makeFreshCookies(): Cookie[] {
8
- const farFuture = Math.floor(Date.now() / 1000) + 365 * 24 * 60 * 60;
9
- return [
10
- {
11
- name: "__Secure-1PSID",
12
- value: "fresh-psid",
13
- domain: ".google.com",
14
- path: "/",
15
- expires: farFuture,
16
- httpOnly: true,
17
- secure: true,
18
- sameSite: "Lax",
19
- },
20
- {
21
- name: "__Secure-1PSIDTS",
22
- value: "fresh-psidts",
23
- domain: ".google.com",
24
- path: "/",
25
- expires: farFuture,
26
- httpOnly: true,
27
- secure: true,
28
- sameSite: "Lax",
29
- },
30
- ];
31
- }
32
-
33
- function makeExpiredCookies(): Cookie[] {
34
- const past = Math.floor(Date.now() / 1000) - 30 * 24 * 60 * 60;
35
- return [
36
- {
37
- name: "__Secure-1PSID",
38
- value: "expired-psid",
39
- domain: ".google.com",
40
- path: "/",
41
- expires: past,
42
- httpOnly: true,
43
- secure: true,
44
- sameSite: "Lax",
45
- },
46
- {
47
- name: "__Secure-1PSIDTS",
48
- value: "expired-psidts",
49
- domain: ".google.com",
50
- path: "/",
51
- expires: past,
52
- httpOnly: true,
53
- secure: true,
54
- sameSite: "Lax",
55
- },
56
- ];
57
- }
58
-
59
- function makeStaleCookies(): Cookie[] {
60
- const soon = Math.floor(Date.now() / 1000) + 3 * 24 * 60 * 60;
61
- return [
62
- {
63
- name: "__Secure-1PSID",
64
- value: "stale-psid",
65
- domain: ".google.com",
66
- path: "/",
67
- expires: soon,
68
- httpOnly: true,
69
- secure: true,
70
- sameSite: "Lax",
71
- },
72
- {
73
- name: "__Secure-1PSIDTS",
74
- value: "stale-psidts",
75
- domain: ".google.com",
76
- path: "/",
77
- expires: soon,
78
- httpOnly: true,
79
- secure: true,
80
- sameSite: "Lax",
81
- },
82
- ];
83
- }
84
-
85
- function makePartialCookies(): Cookie[] {
86
- const farFuture = Math.floor(Date.now() / 1000) + 365 * 24 * 60 * 60;
87
- return [
88
- {
89
- name: "__Secure-1PSID",
90
- value: "only-psid",
91
- domain: ".google.com",
92
- path: "/",
93
- expires: farFuture,
94
- httpOnly: true,
95
- secure: true,
96
- sameSite: "Lax",
97
- },
98
- ];
99
- }
100
-
101
- function createMockCookieStorage(): CookieStorage {
102
- return {
103
- save: mock((_profileName: string, _cookies: Cookie[]) => {}),
104
- load: mock((_profileName: string) => [] as Cookie[]),
105
- delete: mock((_profileName: string) => {}),
106
- list: mock(() => [] as string[]),
107
- } as unknown as CookieStorage;
108
- }
109
-
110
- describe("CookieStorageService", () => {
111
- let storage: CookieStorage;
112
- let service: CookieStorageService;
113
- let logger: Logger;
114
-
115
- beforeEach(() => {
116
- storage = createMockCookieStorage();
117
- logger = new Logger("test");
118
- service = new CookieStorageService({ cookieStorage: storage, logger });
119
- });
120
-
121
- afterEach(() => {
122
- mock.restore();
123
- });
124
-
125
- describe("loadCookiesForProfile", () => {
126
- test("returns cookie values from profile", () => {
127
- storage.load = mock(() => makeFreshCookies()) as CookieStorage["load"];
128
-
129
- const result = service.loadCookiesForProfile("default");
130
- expect(result.secure_1psid).toBe("fresh-psid");
131
- expect(result.secure_1psidts).toBe("fresh-psidts");
132
- });
133
-
134
- test("returns null for 1PSIDTS when missing", () => {
135
- storage.load = mock(() => makePartialCookies()) as CookieStorage["load"];
136
-
137
- const result = service.loadCookiesForProfile("default");
138
- expect(result.secure_1psid).toBe("only-psid");
139
- expect(result.secure_1psidts).toBeNull();
140
- });
141
-
142
- test("throws when __Secure-1PSID is missing", () => {
143
- storage.load = mock(() => [
144
- {
145
- name: "__Secure-1PSIDTS",
146
- value: "no-psid",
147
- domain: ".google.com",
148
- path: "/",
149
- expires: -1,
150
- httpOnly: true,
151
- secure: true,
152
- sameSite: "Lax",
153
- },
154
- ]) as CookieStorage["load"];
155
-
156
- expect(() => service.loadCookiesForProfile("default")).toThrow("Missing required cookie");
157
- });
158
- });
159
-
160
- describe("validateCookies", () => {
161
- test("returns true when both required cookies present", () => {
162
- expect(service.validateCookies(makeFreshCookies())).toBe(true);
163
- });
164
-
165
- test("returns false when __Secure-1PSIDTS is missing", () => {
166
- expect(service.validateCookies(makePartialCookies())).toBe(false);
167
- });
168
-
169
- test("returns false for empty array", () => {
170
- expect(service.validateCookies([])).toBe(false);
171
- });
172
- });
173
-
174
- describe("checkCookieFreshness", () => {
175
- test("returns true when cookies expire far in the future", () => {
176
- expect(service.checkCookieFreshness(makeFreshCookies())).toBe(true);
177
- });
178
-
179
- test("returns false when cookies are expired", () => {
180
- expect(service.checkCookieFreshness(makeExpiredCookies())).toBe(false);
181
- });
182
-
183
- test("returns false when cookies expire within 7 days", () => {
184
- expect(service.checkCookieFreshness(makeStaleCookies())).toBe(false);
185
- });
186
-
187
- test("returns true when 1PSIDTS is a session cookie (expires: -1)", () => {
188
- const sessionCookies: Cookie[] = [
189
- {
190
- name: "__Secure-1PSID",
191
- value: "sid",
192
- domain: ".google.com",
193
- path: "/",
194
- expires: -1,
195
- httpOnly: true,
196
- secure: true,
197
- sameSite: "Lax",
198
- },
199
- {
200
- name: "__Secure-1PSIDTS",
201
- value: "sidts",
202
- domain: ".google.com",
203
- path: "/",
204
- expires: -1,
205
- httpOnly: true,
206
- secure: true,
207
- sameSite: "Lax",
208
- },
209
- ];
210
- expect(service.checkCookieFreshness(sessionCookies)).toBe(true);
211
- });
212
- });
213
-
214
- describe("getCookieExpiry", () => {
215
- test("returns Date for valid expiry", () => {
216
- const result = service.getCookieExpiry(makeFreshCookies());
217
- expect(result).toBeInstanceOf(Date);
218
- expect(result!.getTime()).toBeGreaterThan(Date.now());
219
- });
220
-
221
- test("returns null when __Secure-1PSIDTS has no positive expires", () => {
222
- const noExpiry = makePartialCookies();
223
- expect(service.getCookieExpiry(noExpiry)).toBeNull();
224
- });
225
-
226
- test("returns null for empty cookies", () => {
227
- expect(service.getCookieExpiry([])).toBeNull();
228
- });
229
- });
230
- });