t3code-cli 0.7.0 → 0.9.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 (82) hide show
  1. package/README.md +90 -35
  2. package/dist/application.js +1 -1
  3. package/dist/auth.js +1 -2
  4. package/dist/bin.js +241 -45
  5. package/dist/cli.js +1 -1
  6. package/dist/config.js +1 -3
  7. package/dist/connection.js +1 -4
  8. package/dist/index.js +1 -4
  9. package/dist/layout.js +1 -1
  10. package/dist/orchestration.js +1 -1
  11. package/dist/rpc.js +1 -1
  12. package/dist/runtime.js +1 -2
  13. package/dist/scope.js +1 -1
  14. package/dist/shared.js +85492 -0
  15. package/dist/src/application/layer.d.ts +86 -2
  16. package/dist/src/application/models.d.ts +1 -0
  17. package/dist/src/application/projects.d.ts +10 -1
  18. package/dist/src/application/service.d.ts +30 -1
  19. package/dist/src/application/shell-sequence.d.ts +9 -0
  20. package/dist/src/application/thread-commands.d.ts +27 -1
  21. package/dist/src/application/thread-wait.d.ts +9 -0
  22. package/dist/src/application/threads.d.ts +102 -2
  23. package/dist/src/cli-path/layer.d.ts +3 -0
  24. package/dist/src/cli-path/service.d.ts +8 -0
  25. package/dist/src/domain/helpers.d.ts +9 -0
  26. package/dist/src/domain/model-config.d.ts +3 -0
  27. package/dist/src/domain/thread-activities.d.ts +14 -0
  28. package/dist/src/domain/thread-lifecycle.d.ts +10 -0
  29. package/dist/src/orchestration/layer.d.ts +215 -0
  30. package/dist/src/rpc/layer.d.ts +466 -0
  31. package/dist/src/rpc/ws-group.d.ts +142 -0
  32. package/dist/src/runtime/layer.d.ts +1 -1
  33. package/dist/t3tools.js +2 -2
  34. package/dist/upstream-t3code/packages/contracts/src/environmentHttp.d.ts +33 -10
  35. package/dist/upstream-t3code/packages/contracts/src/ipc.d.ts +6 -0
  36. package/dist/upstream-t3code/packages/contracts/src/orchestration.d.ts +657 -1
  37. package/dist/upstream-t3code/packages/contracts/src/provider.d.ts +14 -0
  38. package/dist/upstream-t3code/packages/contracts/src/providerRuntime.d.ts +175 -1
  39. package/dist/upstream-t3code/packages/contracts/src/rpc.d.ts +492 -0
  40. package/dist/upstream-t3code/packages/contracts/src/server.d.ts +45 -0
  41. package/dist/upstream-t3code/packages/contracts/src/settings.d.ts +21 -0
  42. package/dist/upstream-t3code/packages/contracts/src/terminal.d.ts +6 -3
  43. package/package.json +2 -2
  44. package/src/application/service.ts +32 -0
  45. package/src/application/thread-commands.ts +45 -0
  46. package/src/application/threads.ts +100 -1
  47. package/src/cli/error.ts +15 -0
  48. package/src/cli/message-input.ts +30 -0
  49. package/src/cli/thread-format.ts +47 -0
  50. package/src/cli/thread.ts +8 -0
  51. package/src/cli/threads/approve.ts +61 -0
  52. package/src/cli/threads/archive.ts +18 -3
  53. package/src/cli/threads/callback.ts +92 -0
  54. package/src/cli/threads/respond.ts +70 -0
  55. package/src/cli/threads/show.ts +43 -0
  56. package/src/cli-path/layer.ts +10 -0
  57. package/src/cli-path/service.ts +7 -0
  58. package/src/domain/thread-activities.test.ts +321 -0
  59. package/src/domain/thread-activities.ts +244 -0
  60. package/src/domain/thread-lifecycle.ts +2 -0
  61. package/src/runtime/layer.ts +2 -0
  62. package/dist/Context-DueQ9iMH.js +0 -4916
  63. package/dist/Path-D8WPdPwR.js +0 -11406
  64. package/dist/Schema-DsQxYh6_.js +0 -13581
  65. package/dist/UrlParams-BA6gBvaY.js +0 -205
  66. package/dist/base-dir-R12OMDso.js +0 -20
  67. package/dist/error-B2t1bAP9.js +0 -169
  68. package/dist/error-BHRnjLux.js +0 -15
  69. package/dist/error-jwMt3VoW.js +0 -54
  70. package/dist/flags-CM7_iGdA.js +0 -13371
  71. package/dist/layer-CfC5qZol.js +0 -1508
  72. package/dist/layer-DHhKS5jd.js +0 -13
  73. package/dist/layer-DUv99vsS.js +0 -72
  74. package/dist/layer-DvHnKBYj.js +0 -29466
  75. package/dist/layer-MqCKkIGD.js +0 -1206
  76. package/dist/scope-GycYiJ54.js +0 -29
  77. package/dist/service-CLmRO2Dp.js +0 -8
  78. package/dist/service-ybOWV9pL.js +0 -5
  79. package/dist/src-KdbHqrex.js +0 -8874
  80. package/dist/transport-D3zBdZ1h.js +0 -539
  81. package/dist/url-SlsaG8nY.js +0 -165
  82. /package/dist/{chunk-B5meny8j.js → rolldown-runtime.js} +0 -0
@@ -1,13 +0,0 @@
1
- import { Fn as succeed } from "./Path-D8WPdPwR.js";
2
- import { t as Environment } from "./service-CLmRO2Dp.js";
3
- import { homedir } from "node:os";
4
- //#region src/environment/layer.ts
5
- const NodeEnvironmentLive = succeed(Environment)({
6
- cwd: process.cwd(),
7
- homeDir: homedir(),
8
- env: process.env,
9
- stdoutIsTTY: process.stdout.isTTY ?? false,
10
- stderrIsTTY: process.stderr.isTTY ?? false
11
- });
12
- //#endregion
13
- export { NodeEnvironmentLive as t };
@@ -1,72 +0,0 @@
1
- import { $ as mapError, P as fn, Tt as succeed, Ur as reason, k as fail, kn as effect, t as Path, v as catchFilter } from "./Path-D8WPdPwR.js";
2
- import { L as fromJsonString, P as decodeUnknownEffect, b as Struct, dt as FileSystem, et as optionalKey, n as Boolean, y as String } from "./Schema-DsQxYh6_.js";
3
- import { n as T3Config, t as Environment } from "./service-CLmRO2Dp.js";
4
- import { t as normalizeHttpBaseUrl } from "./url-SlsaG8nY.js";
5
- import { t as ConfigError } from "./error-BHRnjLux.js";
6
- //#region src/config/layer.ts
7
- const makeT3Config = fn("makeT3Config")(function* () {
8
- const fs = yield* FileSystem;
9
- const path = yield* Path;
10
- const environment = yield* Environment;
11
- const configFilePath = resolveConfigPath(path, environment);
12
- const readStored = fn("T3ConfigLive.readStored")(function* () {
13
- const raw = yield* fs.readFileString(configFilePath).pipe(catchFilter(reason("PlatformError", "NotFound"), () => succeed(void 0)), mapError((error) => new ConfigError({
14
- message: "failed to read config",
15
- cause: error
16
- })));
17
- if (raw === void 0) return {};
18
- return yield* parseStoredConfig(raw);
19
- });
20
- return {
21
- readStored,
22
- writeStored: fn("T3ConfigLive.writeStored")(function* (config) {
23
- yield* fs.makeDirectory(path.dirname(configFilePath), {
24
- recursive: true,
25
- mode: 448
26
- }).pipe(mapError((error) => new ConfigError({
27
- message: "failed to write config",
28
- cause: error
29
- })));
30
- yield* fs.writeFileString(configFilePath, `${JSON.stringify(config, null, 2)}\n`, { mode: 384 }).pipe(mapError((error) => new ConfigError({
31
- message: "failed to write config",
32
- cause: error
33
- })));
34
- }),
35
- resolve: fn("T3ConfigLive.resolve")(function* () {
36
- const stored = yield* readStored();
37
- const envUrl = environment.env["T3CODE_URL"];
38
- const envToken = environment.env["T3CODE_TOKEN"];
39
- const envUrlValue = envUrl?.trim();
40
- const envTokenValue = envToken?.trim();
41
- const url = envUrlValue !== void 0 && envUrlValue.length > 0 ? envUrlValue : stored.url;
42
- const token = envTokenValue !== void 0 && envTokenValue.length > 0 ? envTokenValue : stored.token;
43
- if (url === void 0 || url.length === 0 || token === void 0 || token.length === 0) return yield* fail(new ConfigError({ message: "not authenticated. run: t3cli auth pair <pairing-url>" }));
44
- const source = envUrlValue !== void 0 && envUrlValue.length > 0 || envTokenValue !== void 0 && envTokenValue.length > 0 ? "env" : "config";
45
- return {
46
- url: yield* normalizeHttpBaseUrl(url),
47
- token,
48
- source,
49
- local: stored.local ?? false
50
- };
51
- })
52
- };
53
- });
54
- const T3ConfigLive = effect(T3Config, makeT3Config());
55
- const StoredConfigSchema = Struct({
56
- url: optionalKey(String),
57
- token: optionalKey(String),
58
- local: optionalKey(Boolean)
59
- });
60
- function parseStoredConfig(raw) {
61
- return decodeUnknownEffect(fromJsonString(StoredConfigSchema))(raw).pipe(mapError((error) => new ConfigError({
62
- message: "failed to read config",
63
- cause: error
64
- })));
65
- }
66
- function resolveConfigPath(path, environment) {
67
- const xdgConfigHomeValue = environment.env["XDG_CONFIG_HOME"]?.trim();
68
- const root = xdgConfigHomeValue !== void 0 && xdgConfigHomeValue.length > 0 ? xdgConfigHomeValue : path.join(environment.homeDir, ".config");
69
- return path.join(root, "t3cli", "config.json");
70
- }
71
- //#endregion
72
- export { makeT3Config as n, T3ConfigLive as t };