gemiterm 2.0.0 → 2.1.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.
Files changed (150) 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/install-skills-command.ts +35 -0
  5. package/src/cli/index.ts +19 -44
  6. package/src/infrastructure/cli-parser.ts +77 -0
  7. package/src/services/skills-cli-driver.ts +58 -0
  8. package/src/services/skills-service.ts +52 -0
  9. package/.env +0 -2
  10. package/.github/workflows/manual-release.yml +0 -34
  11. package/.github/workflows/release.yml +0 -198
  12. package/.github/workflows/test.yml +0 -29
  13. package/.opencode/commands/opsx-apply.md +0 -152
  14. package/.opencode/commands/opsx-archive.md +0 -157
  15. package/.opencode/commands/opsx-explore.md +0 -169
  16. package/.opencode/commands/opsx-propose.md +0 -104
  17. package/.opencode/commands/opsx-sync.md +0 -140
  18. package/.opencode/commands/search-intelligently.md +0 -9
  19. package/.opencode/opencode.json +0 -20
  20. package/.opencode/skills/intellisearch/.version +0 -1
  21. package/.opencode/skills/intellisearch/SKILL.md +0 -84
  22. package/.opencode/skills/intellisearch/references/brave-search.md +0 -67
  23. package/.opencode/skills/intellisearch/references/ddg-search.md +0 -79
  24. package/.opencode/skills/intellisearch/references/deepwiki-tools.md +0 -246
  25. package/.opencode/skills/intellisearch/references/examples.md +0 -97
  26. package/.opencode/skills/intellisearch/references/gh-cli.md +0 -143
  27. package/.opencode/skills/intellisearch/references/google-search.md +0 -40
  28. package/.opencode/skills/intellisearch/references/search-workflow.md +0 -143
  29. package/.opencode/skills/intellisearch/references/workflow.md +0 -115
  30. package/.opencode/skills/openspec-apply-change/SKILL.md +0 -159
  31. package/.opencode/skills/openspec-archive-change/SKILL.md +0 -117
  32. package/.opencode/skills/openspec-explore/SKILL.md +0 -287
  33. package/.opencode/skills/openspec-propose/SKILL.md +0 -111
  34. package/.opencode/skills/openspec-sync-specs/SKILL.md +0 -147
  35. package/.serena/project.yml +0 -133
  36. package/AGENTS.md +0 -136
  37. package/CHANGELOG.md +0 -3
  38. package/bun.lock +0 -105
  39. package/docs/INSTALL.md +0 -185
  40. package/docs/PLAYWRIGHT_CLI_API.md +0 -306
  41. package/docs/python-release-for-reference.md +0 -175
  42. package/examples/sample_json_export.json +0 -32
  43. package/examples/sample_markdown_export.md +0 -221
  44. package/examples/usage_examples.sh +0 -222
  45. package/install.ps1 +0 -264
  46. package/install.sh +0 -275
  47. package/openspec/MAESTRO_MIGRATION.md +0 -180
  48. package/openspec/changes/archive/2026-06-08-command-spec-conformance/.openspec.yaml +0 -2
  49. package/openspec/changes/archive/2026-06-08-command-spec-conformance/design.md +0 -194
  50. package/openspec/changes/archive/2026-06-08-command-spec-conformance/proposal.md +0 -52
  51. package/openspec/changes/archive/2026-06-08-command-spec-conformance/specs/multi-profile-conversations/spec.md +0 -133
  52. package/openspec/changes/archive/2026-06-08-command-spec-conformance/tasks.md +0 -95
  53. package/openspec/changes/archive/2026-06-09-refactor-interactive-prompt-loop/.openspec.yaml +0 -2
  54. package/openspec/changes/archive/2026-06-09-refactor-interactive-prompt-loop/design.md +0 -28
  55. package/openspec/changes/archive/2026-06-09-refactor-interactive-prompt-loop/proposal.md +0 -22
  56. package/openspec/changes/archive/2026-06-09-refactor-interactive-prompt-loop/specs/interactive-prompt-loop/spec.md +0 -35
  57. package/openspec/changes/archive/2026-06-09-refactor-interactive-prompt-loop/tasks.md +0 -28
  58. package/openspec/changes/archive/2026-06-09-replace-gemini-api-placeholder-with-gemini-reverse/.openspec.yaml +0 -2
  59. package/openspec/changes/archive/2026-06-09-replace-gemini-api-placeholder-with-gemini-reverse/design.md +0 -323
  60. package/openspec/changes/archive/2026-06-09-replace-gemini-api-placeholder-with-gemini-reverse/proposal.md +0 -122
  61. package/openspec/changes/archive/2026-06-09-replace-gemini-api-placeholder-with-gemini-reverse/specs/no-capability-changes/spec.md +0 -29
  62. package/openspec/changes/archive/2026-06-09-replace-gemini-api-placeholder-with-gemini-reverse/tasks.md +0 -172
  63. package/openspec/changes/archive/2026-06-09-v2-install-migration/.openspec.yaml +0 -2
  64. package/openspec/changes/archive/2026-06-09-v2-install-migration/design.md +0 -241
  65. package/openspec/changes/archive/2026-06-09-v2-install-migration/proposal.md +0 -41
  66. package/openspec/changes/archive/2026-06-09-v2-install-migration/specs/v2-installer/spec.md +0 -205
  67. package/openspec/changes/archive/2026-06-09-v2-install-migration/tasks.md +0 -97
  68. package/openspec/changes/commander-cli-parser/.openspec.yaml +0 -2
  69. package/openspec/changes/commander-cli-parser/design.md +0 -107
  70. package/openspec/changes/commander-cli-parser/proposal.md +0 -31
  71. package/openspec/changes/commander-cli-parser/specs/cli/spec.md +0 -48
  72. package/openspec/changes/commander-cli-parser/tasks.md +0 -33
  73. package/openspec/changes/cross-platform-build-and-ci/.openspec.yaml +0 -2
  74. package/openspec/changes/cross-platform-build-and-ci/design.md +0 -213
  75. package/openspec/changes/cross-platform-build-and-ci/proposal.md +0 -50
  76. package/openspec/changes/cross-platform-build-and-ci/specs/path-and-file-mediation/spec.md +0 -335
  77. package/openspec/changes/cross-platform-build-and-ci/specs/release-pipeline/spec.md +0 -95
  78. package/openspec/changes/cross-platform-build-and-ci/tasks.md +0 -164
  79. package/openspec/config.yaml +0 -20
  80. package/openspec/specs/auth/spec.md +0 -394
  81. package/openspec/specs/cli/spec.md +0 -108
  82. package/openspec/specs/commands/spec.md +0 -409
  83. package/openspec/specs/configuration/spec.md +0 -130
  84. package/openspec/specs/conversations/spec.md +0 -139
  85. package/openspec/specs/domain-model/spec.md +0 -128
  86. package/openspec/specs/formatters/spec.md +0 -158
  87. package/openspec/specs/install-browser/spec.md +0 -146
  88. package/openspec/specs/interactive-prompt-loop/spec.md +0 -41
  89. package/openspec/specs/logger/spec.md +0 -71
  90. package/openspec/specs/mediator/spec.md +0 -72
  91. package/openspec/specs/multi-profile-conversations/spec.md +0 -145
  92. package/openspec/specs/path-utils/spec.md +0 -101
  93. package/openspec/specs/profiles/spec.md +0 -94
  94. package/openspec/specs/storage/spec.md +0 -198
  95. package/openspec/specs/testing/spec.md +0 -237
  96. package/openspec/specs/v2-installer/spec.md +0 -205
  97. package/openspec/specs/validators/spec.md +0 -65
  98. package/scripts/build.ts +0 -88
  99. package/scripts/clean-build.ps1 +0 -4
  100. package/scripts/clean-build.sh +0 -5
  101. package/scripts/install-browser.ps1 +0 -5
  102. package/scripts/install-browser.sh +0 -6
  103. package/scripts/lint-path-mediation.ps1 +0 -65
  104. package/scripts/lint-path-mediation.sh +0 -40
  105. package/tests/cli/auth-command.test.ts +0 -220
  106. package/tests/cli/command-registry.test.ts +0 -67
  107. package/tests/cli/continue-command.test.ts +0 -100
  108. package/tests/cli/delete-command.test.ts +0 -128
  109. package/tests/cli/export-all-command.test.ts +0 -375
  110. package/tests/cli/install-browser-command.test.ts +0 -48
  111. package/tests/cli/list-command.test.ts +0 -179
  112. package/tests/cli/new-command.test.ts +0 -139
  113. package/tests/cli/status-command.test.ts +0 -106
  114. package/tests/core/query-handlers.test.ts +0 -187
  115. package/tests/fixtures/auth-fixtures.ts +0 -98
  116. package/tests/fixtures/chat-fixtures.ts +0 -87
  117. package/tests/infrastructure/cli-table.test.ts +0 -107
  118. package/tests/infrastructure/formatters.test.ts +0 -202
  119. package/tests/infrastructure/io.test.ts +0 -197
  120. package/tests/infrastructure/logger.test.ts +0 -74
  121. package/tests/infrastructure/storage.test.ts +0 -335
  122. package/tests/infrastructure/validators.test.ts +0 -67
  123. package/tests/integration/commands/auth.test.ts +0 -186
  124. package/tests/integration/commands/continue.test.ts +0 -130
  125. package/tests/integration/commands/delete.test.ts +0 -140
  126. package/tests/integration/commands/export.test.ts +0 -266
  127. package/tests/integration/commands/fetch.test.ts +0 -238
  128. package/tests/integration/commands/list.test.ts +0 -281
  129. package/tests/integration/commands/profile.test.ts +0 -258
  130. package/tests/integration/commands/status.test.ts +0 -223
  131. package/tests/integration/installer-script-shape.test.ts +0 -67
  132. package/tests/parity/compare-outputs.ts +0 -359
  133. package/tests/parity/test-commands-parity.ps1 +0 -82
  134. package/tests/parity/test-commands-parity.sh +0 -61
  135. package/tests/services/auth-service.test.ts +0 -315
  136. package/tests/services/cookie-monitor.test.ts +0 -229
  137. package/tests/services/cookie-storage-service.test.ts +0 -230
  138. package/tests/services/gemini-client-wrapper.test.ts +0 -688
  139. package/tests/services/install-browser-service.test.ts +0 -83
  140. package/tests/services/playwright-cli-driver.test.ts +0 -468
  141. package/tests/services/profile-auth-manager.test.ts +0 -334
  142. package/tests/services/profile-service.test.ts +0 -224
  143. package/tests/setup.ts +0 -95
  144. package/tests/smoke/smoke.test.ts +0 -52
  145. package/tests/unit/config.test.ts +0 -159
  146. package/tests/unit/errors.test.ts +0 -119
  147. package/tests/unit/formatters.test.ts +0 -316
  148. package/tests/unit/mediator.test.ts +0 -152
  149. package/tests/unit/path-utils.test.ts +0 -289
  150. 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
- });