synorch 0.2.0 → 0.3.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/CHANGELOG.md +32 -1
  2. package/README.md +314 -28
  3. package/dist/application/doctor-service.d.ts +16 -0
  4. package/dist/application/doctor-service.d.ts.map +1 -1
  5. package/dist/application/doctor-service.js +230 -32
  6. package/dist/application/doctor-service.js.map +1 -1
  7. package/dist/application/generated-skill-doctor.d.ts +9 -0
  8. package/dist/application/generated-skill-doctor.d.ts.map +1 -0
  9. package/dist/application/generated-skill-doctor.js +433 -0
  10. package/dist/application/generated-skill-doctor.js.map +1 -0
  11. package/dist/application/project-discovery.d.ts +12 -0
  12. package/dist/application/project-discovery.d.ts.map +1 -1
  13. package/dist/application/project-discovery.js +65 -2
  14. package/dist/application/project-discovery.js.map +1 -1
  15. package/dist/application/safe-path.d.ts +19 -0
  16. package/dist/application/safe-path.d.ts.map +1 -0
  17. package/dist/application/safe-path.js +35 -0
  18. package/dist/application/safe-path.js.map +1 -0
  19. package/dist/application/size-ceiling.d.ts +15 -0
  20. package/dist/application/size-ceiling.d.ts.map +1 -0
  21. package/dist/application/size-ceiling.js +32 -0
  22. package/dist/application/size-ceiling.js.map +1 -0
  23. package/dist/application/structure-service.d.ts.map +1 -1
  24. package/dist/application/structure-service.js +10 -1
  25. package/dist/application/structure-service.js.map +1 -1
  26. package/dist/cli.js +10 -1
  27. package/dist/cli.js.map +1 -1
  28. package/dist/domain/canonical-contracts.d.ts +69 -0
  29. package/dist/domain/canonical-contracts.d.ts.map +1 -0
  30. package/dist/domain/canonical-contracts.js +92 -0
  31. package/dist/domain/canonical-contracts.js.map +1 -0
  32. package/dist/domain/generated-skill.d.ts +55 -0
  33. package/dist/domain/generated-skill.d.ts.map +1 -0
  34. package/dist/domain/generated-skill.js +90 -0
  35. package/dist/domain/generated-skill.js.map +1 -0
  36. package/dist/domain/generation.d.ts +15 -2
  37. package/dist/domain/generation.d.ts.map +1 -1
  38. package/dist/domain/observation-ledger.d.ts +118 -0
  39. package/dist/domain/observation-ledger.d.ts.map +1 -0
  40. package/dist/domain/observation-ledger.js +183 -0
  41. package/dist/domain/observation-ledger.js.map +1 -0
  42. package/dist/domain/product.d.ts +1 -1
  43. package/dist/domain/product.js +1 -1
  44. package/dist/domain/relative-path.d.ts +21 -0
  45. package/dist/domain/relative-path.d.ts.map +1 -0
  46. package/dist/domain/relative-path.js +43 -0
  47. package/dist/domain/relative-path.js.map +1 -0
  48. package/dist/domain/skill-packs.d.ts.map +1 -1
  49. package/dist/domain/skill-packs.js +1 -0
  50. package/dist/domain/skill-packs.js.map +1 -1
  51. package/dist/domain/zod-issues.d.ts +21 -0
  52. package/dist/domain/zod-issues.d.ts.map +1 -0
  53. package/dist/domain/zod-issues.js +27 -0
  54. package/dist/domain/zod-issues.js.map +1 -0
  55. package/dist/infrastructure/frontmatter.d.ts +25 -0
  56. package/dist/infrastructure/frontmatter.d.ts.map +1 -0
  57. package/dist/infrastructure/frontmatter.js +75 -0
  58. package/dist/infrastructure/frontmatter.js.map +1 -0
  59. package/dist/templates/agent-manifests.d.ts +19 -0
  60. package/dist/templates/agent-manifests.d.ts.map +1 -0
  61. package/dist/templates/agent-manifests.js +302 -0
  62. package/dist/templates/agent-manifests.js.map +1 -0
  63. package/dist/templates/base-skills.d.ts +23 -0
  64. package/dist/templates/base-skills.d.ts.map +1 -0
  65. package/dist/templates/base-skills.js +477 -0
  66. package/dist/templates/base-skills.js.map +1 -0
  67. package/dist/templates/skill-creator-skill.d.ts +23 -0
  68. package/dist/templates/skill-creator-skill.d.ts.map +1 -0
  69. package/dist/templates/skill-creator-skill.js +235 -0
  70. package/dist/templates/skill-creator-skill.js.map +1 -0
  71. package/dist/templates/skill-references.d.ts +13 -0
  72. package/dist/templates/skill-references.d.ts.map +1 -0
  73. package/dist/templates/skill-references.js +280 -0
  74. package/dist/templates/skill-references.js.map +1 -0
  75. package/dist/templates/structure-templates.d.ts.map +1 -1
  76. package/dist/templates/structure-templates.js +15 -139
  77. package/dist/templates/structure-templates.js.map +1 -1
  78. package/dist/templates/task-conductor-skill.d.ts +1 -1
  79. package/dist/templates/task-conductor-skill.d.ts.map +1 -1
  80. package/dist/templates/task-conductor-skill.js +50 -22
  81. package/dist/templates/task-conductor-skill.js.map +1 -1
  82. package/package.json +1 -1
@@ -0,0 +1,55 @@
1
+ import { z } from "zod";
2
+ /** Generated project skills live in their own namespace and are never touched by `sync`. */
3
+ export declare const GENERATED_SKILL_DIRECTORY = ".ai/skills/project";
4
+ /** Blocking size ceiling for a generated `SKILL.md`, in bytes. */
5
+ export declare const GENERATED_SKILL_MAX_BYTES = 15360;
6
+ /** Blocking budget: the number of project skills that may be `active` at the same time. */
7
+ export declare const GENERATED_SKILL_ACTIVE_BUDGET = 12;
8
+ export declare const generatedSkillEvidenceSchema: z.ZodObject<{
9
+ claim: z.ZodString;
10
+ source: z.ZodString;
11
+ digest: z.ZodString;
12
+ }, z.core.$strip>;
13
+ export type GeneratedSkillEvidence = z.infer<typeof generatedSkillEvidenceSchema>;
14
+ /**
15
+ * Canonical Skill Contract v1 (`skillContractSchema`) plus the provenance fields of
16
+ * design §5. Only two inherited fields are overridden, both to tighten them: a generated
17
+ * skill must state `priority: skill` explicitly rather than inherit the shared default,
18
+ * because the ceiling is a security property a reviewer has to be able to read in the file
19
+ * itself; and its `references` must be provably relative, since nothing else validates the
20
+ * reference paths of a skill outside the canonical set.
21
+ */
22
+ export declare const generatedSkillFrontmatterSchema: z.ZodObject<{
23
+ name: z.ZodString;
24
+ description: z.ZodString;
25
+ version: z.ZodString;
26
+ not_for: z.ZodOptional<z.ZodString>;
27
+ inputs: z.ZodOptional<z.ZodArray<z.ZodString>>;
28
+ tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
29
+ outputs: z.ZodOptional<z.ZodString>;
30
+ references: z.ZodOptional<z.ZodArray<z.ZodString>>;
31
+ priority: z.ZodLiteral<"skill">;
32
+ origin: z.ZodLiteral<"generated">;
33
+ status: z.ZodEnum<{
34
+ proposed: "proposed";
35
+ active: "active";
36
+ stale: "stale";
37
+ retired: "retired";
38
+ }>;
39
+ generated_at: z.ZodString;
40
+ verified_at: z.ZodString;
41
+ confirmations: z.ZodInt;
42
+ promotion: z.ZodEnum<{
43
+ "user-correction": "user-correction";
44
+ threshold: "threshold";
45
+ }>;
46
+ confirmed_by: z.ZodArray<z.ZodString>;
47
+ evidence: z.ZodArray<z.ZodObject<{
48
+ claim: z.ZodString;
49
+ source: z.ZodString;
50
+ digest: z.ZodString;
51
+ }, z.core.$strip>>;
52
+ supersedes: z.ZodArray<z.ZodString>;
53
+ }, z.core.$strip>;
54
+ export type GeneratedSkillFrontmatter = z.infer<typeof generatedSkillFrontmatterSchema>;
55
+ //# sourceMappingURL=generated-skill.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-skill.d.ts","sourceRoot":"","sources":["../../src/domain/generated-skill.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAQxB,4FAA4F;AAC5F,eAAO,MAAM,yBAAyB,uBAAuB,CAAC;AAE9D,kEAAkE;AAClE,eAAO,MAAM,yBAAyB,QAAS,CAAC;AAEhD,2FAA2F;AAC3F,eAAO,MAAM,6BAA6B,KAAK,CAAC;AA6BhD,eAAO,MAAM,4BAA4B;;;;iBAIvC,CAAC;AACH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAElF;;;;;;;GAOG;AACH,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA6CxC,CAAC;AACL,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC"}
@@ -0,0 +1,90 @@
1
+ import { z } from "zod";
2
+ import { skillContractSchema } from "./canonical-contracts.js";
3
+ import { OBSERVATION_PROMOTION_THRESHOLD, digestSchema, } from "./observation-ledger.js";
4
+ import { isSafeDescendantPath } from "./relative-path.js";
5
+ /** Generated project skills live in their own namespace and are never touched by `sync`. */
6
+ export const GENERATED_SKILL_DIRECTORY = ".ai/skills/project";
7
+ /** Blocking size ceiling for a generated `SKILL.md`, in bytes. */
8
+ export const GENERATED_SKILL_MAX_BYTES = 15_360;
9
+ /** Blocking budget: the number of project skills that may be `active` at the same time. */
10
+ export const GENERATED_SKILL_ACTIVE_BUDGET = 12;
11
+ const isoDateSchema = z
12
+ .string()
13
+ .regex(/^\d{4}-\d{2}-\d{2}$/, "must be an ISO calendar date (YYYY-MM-DD)")
14
+ .refine(isRealIsoDate, "must be a real calendar date");
15
+ function isRealIsoDate(value) {
16
+ const match = /^(\d{4})-(\d{2})-(\d{2})$/.exec(value);
17
+ if (match === null)
18
+ return false;
19
+ const [year, month, day] = [Number(match[1]), Number(match[2]), Number(match[3])];
20
+ const date = new Date(Date.UTC(year, month - 1, day));
21
+ return (date.getUTCFullYear() === year &&
22
+ date.getUTCMonth() === month - 1 &&
23
+ date.getUTCDate() === day);
24
+ }
25
+ /**
26
+ * A reference must stay inside the skill's own directory. The lexical rule is shared with the
27
+ * doctors (`isSafeRelativePath`), so a UNC root, a drive letter, a leading separator in either
28
+ * separator style and any `..` segment are rejected here rather than only at the file system.
29
+ */
30
+ const referencePathSchema = z
31
+ .string()
32
+ .min(1)
33
+ .refine(isSafeDescendantPath, "must be a relative path inside the skill directory");
34
+ export const generatedSkillEvidenceSchema = z.object({
35
+ claim: z.string().min(1),
36
+ source: z.string().min(1),
37
+ digest: digestSchema,
38
+ });
39
+ /**
40
+ * Canonical Skill Contract v1 (`skillContractSchema`) plus the provenance fields of
41
+ * design §5. Only two inherited fields are overridden, both to tighten them: a generated
42
+ * skill must state `priority: skill` explicitly rather than inherit the shared default,
43
+ * because the ceiling is a security property a reviewer has to be able to read in the file
44
+ * itself; and its `references` must be provably relative, since nothing else validates the
45
+ * reference paths of a skill outside the canonical set.
46
+ */
47
+ export const generatedSkillFrontmatterSchema = skillContractSchema
48
+ .extend({
49
+ references: z.array(referencePathSchema).optional(),
50
+ priority: z.literal("skill"),
51
+ origin: z.literal("generated"),
52
+ status: z.enum(["proposed", "active", "stale", "retired"]),
53
+ generated_at: isoDateSchema,
54
+ verified_at: isoDateSchema,
55
+ confirmations: z.int().min(1),
56
+ /**
57
+ * `threshold` is the ordinary three-confirmation path; `user-correction` is the fast path
58
+ * from D6 and is the only way a skill may carry fewer than three confirmations.
59
+ */
60
+ promotion: z.enum(["threshold", "user-correction"]),
61
+ confirmed_by: z.array(z.string().min(1)).min(1),
62
+ evidence: z.array(generatedSkillEvidenceSchema).min(1),
63
+ supersedes: z.array(z.string().min(1)),
64
+ })
65
+ .superRefine((frontmatter, context) => {
66
+ if (frontmatter.promotion === "threshold" &&
67
+ frontmatter.confirmations < OBSERVATION_PROMOTION_THRESHOLD) {
68
+ context.addIssue({
69
+ code: "custom",
70
+ message: `confirmations must be at least ${OBSERVATION_PROMOTION_THRESHOLD} unless ` +
71
+ "promotion is user-correction",
72
+ path: ["confirmations"],
73
+ });
74
+ }
75
+ if (frontmatter.confirmations !== frontmatter.confirmed_by.length) {
76
+ context.addIssue({
77
+ code: "custom",
78
+ message: "confirmations must equal the number of confirming task ids",
79
+ path: ["confirmations"],
80
+ });
81
+ }
82
+ if (new Set(frontmatter.confirmed_by).size !== frontmatter.confirmed_by.length) {
83
+ context.addIssue({
84
+ code: "custom",
85
+ message: "confirmed_by must contain distinct task ids",
86
+ path: ["confirmed_by"],
87
+ });
88
+ }
89
+ });
90
+ //# sourceMappingURL=generated-skill.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generated-skill.js","sourceRoot":"","sources":["../../src/domain/generated-skill.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EACL,+BAA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WAAW,EAAE,OAAO,EAAE,EAAE;IACpC,IACE,WAAW,CAAC,SAAS,KAAK,WAAW;QACrC,WAAW,CAAC,aAAa,GAAG,+BAA+B,EAC3D,CAAC;QACD,OAAO,CAAC,QAAQ,CAAC;YACf,IAAI,EAAE,QAAQ;YACd,OAAO,EACL,kCAAkC,+BAA+B,UAAU;gBAC3E,8BAA8B;YAChC,IAAI,EAAE,CAAC,eAAe,CAAC;SACxB,CAAC,CAAC;IACL,CAAC;IACD,IAAI,WAAW,CAAC,aAAa,KAAK,WAAW,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC;QAClE,OAAO,CAAC,QAAQ,CAAC;YACf,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,4DAA4D;YACrE,IAAI,EAAE,CAAC,eAAe,CAAC;SACxB,CAAC,CAAC;IACL,CAAC;IACD,IAAI,IAAI,GAAG,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,IAAI,KAAK,WAAW,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC;QAC/E,OAAO,CAAC,QAAQ,CAAC;YACf,IAAI,EAAE,QAAQ;YACd,OAAO,EAAE,6CAA6C;YACtD,IAAI,EAAE,CAAC,cAAc,CAAC;SACvB,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC,CAAC"}
@@ -1,10 +1,22 @@
1
- export type PlannedFileKind = "entrypoint" | "canonical" | "protocol" | "agent" | "skill" | "schema" | "provider";
1
+ export type PlannedFileKind = "entrypoint" | "canonical" | "protocol" | "agent" | "skill" | "reference" | "schema" | "provider";
2
+ /**
3
+ * How `init` may write a file that already exists.
4
+ *
5
+ * `overwrite` is the canonical default: the file is generated content, so `--force` refreshes it.
6
+ * `create-only` marks a seed for state the user and the agents own afterwards — the observation
7
+ * ledger is the only one today. It is written when absent and never again, with or without
8
+ * `--force`, because design D12/§9 forbid destroying user-approved state silently.
9
+ */
10
+ export type FileWritePolicy = "overwrite" | "create-only";
2
11
  export interface FileDefinition {
3
12
  readonly relativePath: string;
4
13
  readonly content: string;
5
14
  readonly kind: PlannedFileKind;
15
+ readonly writePolicy?: FileWritePolicy;
6
16
  }
7
- export type PlannedFileStatus = "create" | "unchanged" | "conflict" | "update";
17
+ export type PlannedFileStatus = "create" | "unchanged" | "conflict" | "update"
18
+ /** The file exists and is create-only, so `init` leaves it exactly as it found it. */
19
+ | "preserved";
8
20
  export interface PlannedFile extends FileDefinition {
9
21
  readonly status: PlannedFileStatus;
10
22
  }
@@ -17,5 +29,6 @@ export interface InitResult {
17
29
  readonly created: readonly string[];
18
30
  readonly updated: readonly string[];
19
31
  readonly unchanged: readonly string[];
32
+ readonly preserved: readonly string[];
20
33
  }
21
34
  //# sourceMappingURL=generation.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"generation.d.ts","sourceRoot":"","sources":["../../src/domain/generation.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,eAAe,GACvB,YAAY,GACZ,WAAW,GACX,UAAU,GACV,OAAO,GACP,OAAO,GACP,QAAQ,GACR,UAAU,CAAC;AAEf,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,IAAI,EAAE,eAAe,CAAC;CAChC;AAED,MAAM,MAAM,iBAAiB,GAAG,QAAQ,GAAG,WAAW,GAAG,UAAU,GAAG,QAAQ,CAAC;AAE/E,MAAM,WAAW,WAAY,SAAQ,cAAc;IACjD,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;CACpC;AAED,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,eAAe,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,KAAK,EAAE,WAAW,GAAG,YAAY,CAAC;IAC3C,QAAQ,CAAC,KAAK,EAAE,SAAS,WAAW,EAAE,CAAC;CACxC;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,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"}
@@ -0,0 +1,118 @@
1
+ import { z } from "zod";
2
+ /** The ledger is the orchestrator's only writable distillation surface (`.ai/tasks/**`). */
3
+ export declare const OBSERVATION_LEDGER_PATH = ".ai/tasks/observations.yaml";
4
+ /** An unpromoted observation expires 90 days after its last confirmation. */
5
+ export declare const OBSERVATION_EXPIRY_DAYS = 90;
6
+ /** An unpromoted observation expires 20 completed tasks after its last confirmation. */
7
+ export declare const OBSERVATION_EXPIRY_TASKS = 20;
8
+ /** Promotion requires this many distinct confirming task ids unless a user correction fast-paths it. */
9
+ export declare const OBSERVATION_PROMOTION_THRESHOLD = 3;
10
+ /**
11
+ * The shortest truncated digest a record may carry, in hex characters. A prefix is accepted
12
+ * because reports quote shortened digests, but 16 hex characters is only 64 bits and a prefix
13
+ * match is what proves a source unchanged, so the floor is 32 (128 bits).
14
+ */
15
+ export declare const DIGEST_MIN_HEX_CHARACTERS = 32;
16
+ /** `sha256:` plus the shortest accepted hex prefix: the minimum length of a recorded digest. */
17
+ export declare const DIGEST_MIN_LENGTH: number;
18
+ /**
19
+ * Digests are `sha256:<hex>` over the source file's bytes with line endings normalized to `\n`,
20
+ * so the same working tree yields the same digest on every platform.
21
+ */
22
+ export declare const digestSchema: z.ZodString;
23
+ export declare const OBSERVATION_KINDS: readonly ["command-behavior", "convention", "ordering-constraint", "pitfall", "boundary"];
24
+ export declare const OBSERVATION_STATUSES: readonly ["collecting", "ready-to-propose", "proposed", "promoted", "declined", "expired"];
25
+ export declare const observationSourceSchema: z.ZodObject<{
26
+ path: z.ZodString;
27
+ digest: z.ZodString;
28
+ }, z.core.$strip>;
29
+ export type ObservationSource = z.infer<typeof observationSourceSchema>;
30
+ export declare const observationSchema: z.ZodObject<{
31
+ id: z.ZodString;
32
+ claim: z.ZodString;
33
+ kind: z.ZodEnum<{
34
+ "command-behavior": "command-behavior";
35
+ convention: "convention";
36
+ "ordering-constraint": "ordering-constraint";
37
+ pitfall: "pitfall";
38
+ boundary: "boundary";
39
+ }>;
40
+ sources: z.ZodArray<z.ZodObject<{
41
+ path: z.ZodString;
42
+ digest: z.ZodString;
43
+ }, z.core.$strip>>;
44
+ confirmed_by: z.ZodArray<z.ZodString>;
45
+ count: z.ZodInt;
46
+ origin: z.ZodEnum<{
47
+ "worker-discovery": "worker-discovery";
48
+ "user-correction": "user-correction";
49
+ }>;
50
+ first_seen_at: z.ZodString;
51
+ last_seen_at: z.ZodString;
52
+ last_seen_task_index: z.ZodInt;
53
+ status: z.ZodEnum<{
54
+ collecting: "collecting";
55
+ "ready-to-propose": "ready-to-propose";
56
+ proposed: "proposed";
57
+ promoted: "promoted";
58
+ declined: "declined";
59
+ expired: "expired";
60
+ }>;
61
+ promoted_to: z.ZodOptional<z.ZodString>;
62
+ }, z.core.$strip>;
63
+ export type Observation = z.infer<typeof observationSchema>;
64
+ export declare const observationLedgerSchema: z.ZodObject<{
65
+ schema_version: z.ZodLiteral<1>;
66
+ tasks_seen: z.ZodInt;
67
+ observations: z.ZodArray<z.ZodObject<{
68
+ id: z.ZodString;
69
+ claim: z.ZodString;
70
+ kind: z.ZodEnum<{
71
+ "command-behavior": "command-behavior";
72
+ convention: "convention";
73
+ "ordering-constraint": "ordering-constraint";
74
+ pitfall: "pitfall";
75
+ boundary: "boundary";
76
+ }>;
77
+ sources: z.ZodArray<z.ZodObject<{
78
+ path: z.ZodString;
79
+ digest: z.ZodString;
80
+ }, z.core.$strip>>;
81
+ confirmed_by: z.ZodArray<z.ZodString>;
82
+ count: z.ZodInt;
83
+ origin: z.ZodEnum<{
84
+ "worker-discovery": "worker-discovery";
85
+ "user-correction": "user-correction";
86
+ }>;
87
+ first_seen_at: z.ZodString;
88
+ last_seen_at: z.ZodString;
89
+ last_seen_task_index: z.ZodInt;
90
+ status: z.ZodEnum<{
91
+ collecting: "collecting";
92
+ "ready-to-propose": "ready-to-propose";
93
+ proposed: "proposed";
94
+ promoted: "promoted";
95
+ declined: "declined";
96
+ expired: "expired";
97
+ }>;
98
+ promoted_to: z.ZodOptional<z.ZodString>;
99
+ }, z.core.$strip>>;
100
+ }, z.core.$strip>;
101
+ export type ObservationLedger = z.infer<typeof observationLedgerSchema>;
102
+ export interface LedgerPruneResult {
103
+ readonly ledger: ObservationLedger;
104
+ /** Pruned observation ids, sorted, so callers and reports stay deterministic. */
105
+ readonly expired: readonly string[];
106
+ }
107
+ export declare function createEmptyLedger(): ObservationLedger;
108
+ /**
109
+ * Remove observations that never reached promotion and have gone quiet: 90 days since
110
+ * `last_seen_at`, or 20 completed tasks since `last_seen_task_index`, whichever comes first.
111
+ * `declined` is permanent and `promoted` is durable, so neither is ever pruned; `expired`
112
+ * entries left behind by the orchestrator are swept out here.
113
+ */
114
+ export declare function pruneExpiredObservations(ledger: ObservationLedger, now: Date): LedgerPruneResult;
115
+ export declare function isExpiredObservation(observation: Observation, tasksSeen: number, now: Date): boolean;
116
+ /** Deterministic ledger order, independent of the order in which observations were recorded. */
117
+ export declare function sortObservations(observations: readonly Observation[]): Observation[];
118
+ //# sourceMappingURL=observation-ledger.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"observation-ledger.d.ts","sourceRoot":"","sources":["../../src/domain/observation-ledger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,4FAA4F;AAC5F,eAAO,MAAM,uBAAuB,gCAAgC,CAAC;AAErE,6EAA6E;AAC7E,eAAO,MAAM,uBAAuB,KAAK,CAAC;AAE1C,wFAAwF;AACxF,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAE3C,wGAAwG;AACxG,eAAO,MAAM,+BAA+B,IAAI,CAAC;AAcjD;;;;GAIG;AACH,eAAO,MAAM,yBAAyB,KAAK,CAAC;AAE5C,gGAAgG;AAChG,eAAO,MAAM,iBAAiB,QAA+C,CAAC;AAE9E;;;GAGG;AACH,eAAO,MAAM,YAAY,aAE+D,CAAC;AAEzF,eAAO,MAAM,iBAAiB,2FAMpB,CAAC;AAEX,eAAO,MAAM,oBAAoB,4FAOvB,CAAC;AAEX,eAAO,MAAM,uBAAuB;;;iBAGlC,CAAC;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA0C1B,CAAC;AACL,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBA4BhC,CAAC;AACL,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,MAAM,EAAE,iBAAiB,CAAC;IACnC,iFAAiF;IACjF,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAC;CACrC;AAED,wBAAgB,iBAAiB,IAAI,iBAAiB,CAErD;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,iBAAiB,EACzB,GAAG,EAAE,IAAI,GACR,iBAAiB,CAcnB;AAED,wBAAgB,oBAAoB,CAClC,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,IAAI,GACR,OAAO,CAST;AAED,gGAAgG;AAChG,wBAAgB,gBAAgB,CAAC,YAAY,EAAE,SAAS,WAAW,EAAE,GAAG,WAAW,EAAE,CAEpF"}
@@ -0,0 +1,183 @@
1
+ import { z } from "zod";
2
+ /** The ledger is the orchestrator's only writable distillation surface (`.ai/tasks/**`). */
3
+ export const OBSERVATION_LEDGER_PATH = ".ai/tasks/observations.yaml";
4
+ /** An unpromoted observation expires 90 days after its last confirmation. */
5
+ export const OBSERVATION_EXPIRY_DAYS = 90;
6
+ /** An unpromoted observation expires 20 completed tasks after its last confirmation. */
7
+ export const OBSERVATION_EXPIRY_TASKS = 20;
8
+ /** Promotion requires this many distinct confirming task ids unless a user correction fast-paths it. */
9
+ export const OBSERVATION_PROMOTION_THRESHOLD = 3;
10
+ const MILLISECONDS_PER_DAY = 86_400_000;
11
+ const identifierSchema = z
12
+ .string()
13
+ .regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/, "must be kebab-case");
14
+ /** Calendar date without a time component, exactly as the design records it. */
15
+ const isoDateSchema = z
16
+ .string()
17
+ .regex(/^\d{4}-\d{2}-\d{2}$/, "must be an ISO calendar date (YYYY-MM-DD)")
18
+ .refine((value) => parseIsoDate(value) !== undefined, "must be a real calendar date");
19
+ /**
20
+ * The shortest truncated digest a record may carry, in hex characters. A prefix is accepted
21
+ * because reports quote shortened digests, but 16 hex characters is only 64 bits and a prefix
22
+ * match is what proves a source unchanged, so the floor is 32 (128 bits).
23
+ */
24
+ export const DIGEST_MIN_HEX_CHARACTERS = 32;
25
+ /** `sha256:` plus the shortest accepted hex prefix: the minimum length of a recorded digest. */
26
+ export const DIGEST_MIN_LENGTH = "sha256:".length + DIGEST_MIN_HEX_CHARACTERS;
27
+ /**
28
+ * Digests are `sha256:<hex>` over the source file's bytes with line endings normalized to `\n`,
29
+ * so the same working tree yields the same digest on every platform.
30
+ */
31
+ export const digestSchema = z
32
+ .string()
33
+ .regex(/^sha256:[0-9a-f]{32,64}$/, "must be sha256:<hex>, at least 32 hex characters");
34
+ export const OBSERVATION_KINDS = [
35
+ "command-behavior",
36
+ "convention",
37
+ "ordering-constraint",
38
+ "pitfall",
39
+ "boundary",
40
+ ];
41
+ export const OBSERVATION_STATUSES = [
42
+ "collecting",
43
+ "ready-to-propose",
44
+ "proposed",
45
+ "promoted",
46
+ "declined",
47
+ "expired",
48
+ ];
49
+ export const observationSourceSchema = z.object({
50
+ path: z.string().min(1),
51
+ digest: digestSchema,
52
+ });
53
+ export const observationSchema = z
54
+ .object({
55
+ id: identifierSchema,
56
+ claim: z.string().min(1),
57
+ kind: z.enum(OBSERVATION_KINDS),
58
+ /** No source, no observation: the evidence requirement is structural, not advisory. */
59
+ sources: z.array(observationSourceSchema).min(1),
60
+ confirmed_by: z.array(z.string().min(1)),
61
+ count: z.int().min(0),
62
+ origin: z.enum(["worker-discovery", "user-correction"]),
63
+ first_seen_at: isoDateSchema,
64
+ last_seen_at: isoDateSchema,
65
+ /**
66
+ * The value of the ledger's `tasks_seen` counter at the last confirmation. It is what makes
67
+ * the "20 tasks without reconfirmation" rule decidable without a clock or a task history.
68
+ */
69
+ last_seen_task_index: z.int().min(0),
70
+ status: z.enum(OBSERVATION_STATUSES),
71
+ /**
72
+ * The id of the generated project skill this observation was promoted into. Together with
73
+ * `status: active` in that skill's own frontmatter it is the entire expression of activation:
74
+ * there is no registry entry, because `.ai/projects/<id>.skills.yaml` has no project-skill
75
+ * slot, is regenerated by every `sync`, and lies outside the orchestrator's write scope.
76
+ * Optional, so ledgers written before promotion links existed still validate.
77
+ */
78
+ promoted_to: identifierSchema.optional(),
79
+ })
80
+ .superRefine((observation, context) => {
81
+ if (observation.count !== observation.confirmed_by.length) {
82
+ context.addIssue({
83
+ code: "custom",
84
+ message: "count must equal the number of confirming task ids",
85
+ path: ["count"],
86
+ });
87
+ }
88
+ if (new Set(observation.confirmed_by).size !== observation.confirmed_by.length) {
89
+ context.addIssue({
90
+ code: "custom",
91
+ message: "confirmed_by must contain distinct task ids",
92
+ path: ["confirmed_by"],
93
+ });
94
+ }
95
+ });
96
+ export const observationLedgerSchema = z
97
+ .object({
98
+ schema_version: z.literal(1),
99
+ /**
100
+ * Monotonic count of completed tasks. The orchestrator increments it exactly once per
101
+ * completed task, in the same write that records or reconfirms observations.
102
+ */
103
+ tasks_seen: z.int().min(0),
104
+ observations: z.array(observationSchema),
105
+ })
106
+ .superRefine((ledger, context) => {
107
+ const identifiers = ledger.observations.map((observation) => observation.id);
108
+ if (new Set(identifiers).size !== identifiers.length) {
109
+ context.addIssue({
110
+ code: "custom",
111
+ message: "observation ids must be unique",
112
+ path: ["observations"],
113
+ });
114
+ }
115
+ for (const [index, observation] of ledger.observations.entries()) {
116
+ if (observation.last_seen_task_index > ledger.tasks_seen) {
117
+ context.addIssue({
118
+ code: "custom",
119
+ message: "last_seen_task_index cannot exceed the ledger tasks_seen counter",
120
+ path: ["observations", index, "last_seen_task_index"],
121
+ });
122
+ }
123
+ }
124
+ });
125
+ export function createEmptyLedger() {
126
+ return { schema_version: 1, tasks_seen: 0, observations: [] };
127
+ }
128
+ /**
129
+ * Remove observations that never reached promotion and have gone quiet: 90 days since
130
+ * `last_seen_at`, or 20 completed tasks since `last_seen_task_index`, whichever comes first.
131
+ * `declined` is permanent and `promoted` is durable, so neither is ever pruned; `expired`
132
+ * entries left behind by the orchestrator are swept out here.
133
+ */
134
+ export function pruneExpiredObservations(ledger, now) {
135
+ const kept = [];
136
+ const expired = [];
137
+ for (const observation of ledger.observations) {
138
+ if (isExpiredObservation(observation, ledger.tasks_seen, now)) {
139
+ expired.push(observation.id);
140
+ continue;
141
+ }
142
+ kept.push(observation);
143
+ }
144
+ return {
145
+ ledger: { ...ledger, observations: sortObservations(kept) },
146
+ expired: [...expired].sort((left, right) => left.localeCompare(right)),
147
+ };
148
+ }
149
+ export function isExpiredObservation(observation, tasksSeen, now) {
150
+ if (observation.status === "expired")
151
+ return true;
152
+ if (observation.status !== "collecting" && observation.status !== "ready-to-propose") {
153
+ return false;
154
+ }
155
+ return (daysSince(observation.last_seen_at, now) >= OBSERVATION_EXPIRY_DAYS ||
156
+ tasksSeen - observation.last_seen_task_index >= OBSERVATION_EXPIRY_TASKS);
157
+ }
158
+ /** Deterministic ledger order, independent of the order in which observations were recorded. */
159
+ export function sortObservations(observations) {
160
+ return [...observations].sort((left, right) => left.id.localeCompare(right.id));
161
+ }
162
+ /** Whole days elapsed since an ISO calendar date, measured in UTC. Unparseable dates never expire. */
163
+ function daysSince(isoDate, now) {
164
+ const seen = parseIsoDate(isoDate);
165
+ if (seen === undefined)
166
+ return 0;
167
+ return Math.floor((now.getTime() - seen) / MILLISECONDS_PER_DAY);
168
+ }
169
+ function parseIsoDate(value) {
170
+ const match = /^(\d{4})-(\d{2})-(\d{2})$/.exec(value);
171
+ if (match === null)
172
+ return undefined;
173
+ const [year, month, day] = [Number(match[1]), Number(match[2]), Number(match[3])];
174
+ const timestamp = Date.UTC(year, month - 1, day);
175
+ const date = new Date(timestamp);
176
+ if (date.getUTCFullYear() !== year ||
177
+ date.getUTCMonth() !== month - 1 ||
178
+ date.getUTCDate() !== day) {
179
+ return undefined;
180
+ }
181
+ return timestamp;
182
+ }
183
+ //# sourceMappingURL=observation-ledger.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"observation-ledger.js","sourceRoot":"","sources":["../../src/domain/observation-ledger.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,4FAA4F;AAC5F,MAAM,CAAC,MAAM,uBAAuB,GAAG,6BAA6B,CAAC;AAErE,6EAA6E;AAC7E,MAAM,CAAC,MAAM,uBAAuB,GAAG,EAAE,CAAC;AAE1C,wFAAwF;AACxF,MAAM,CAAC,MAAM,wBAAwB,GAAG,EAAE,CAAC;AAE3C,wGAAwG;AACxG,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,CAAC;AAEjD,MAAM,oBAAoB,GAAG,UAAU,CAAC;AAExC,MAAM,gBAAgB,GAAG,CAAC;KACvB,MAAM,EAAE;KACR,KAAK,CAAC,4BAA4B,EAAE,oBAAoB,CAAC,CAAC;AAE7D,gFAAgF;AAChF,MAAM,aAAa,GAAG,CAAC;KACpB,MAAM,EAAE;KACR,KAAK,CAAC,qBAAqB,EAAE,2CAA2C,CAAC;KACzE,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,KAAK,SAAS,EAAE,8BAA8B,CAAC,CAAC;AAExF;;;;GAIG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,EAAE,CAAC;AAE5C,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AAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACtD,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,SAAS,CAAC;IACrC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,GAAG,CAAC,GAAG,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IAClF,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,KAAK,GAAG,CAAC,EAAE,GAAG,CAAC,CAAC;IACjD,MAAM,IAAI,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,CAAC;IACjC,IACE,IAAI,CAAC,cAAc,EAAE,KAAK,IAAI;QAC9B,IAAI,CAAC,WAAW,EAAE,KAAK,KAAK,GAAG,CAAC;QAChC,IAAI,CAAC,UAAU,EAAE,KAAK,GAAG,EACzB,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -1,3 +1,3 @@
1
1
  export declare const SYNORCH_GENERATOR_NAME: "synorch";
2
- export declare const SYNORCH_VERSION: "0.2.0";
2
+ export declare const SYNORCH_VERSION: "0.3.0";
3
3
  //# sourceMappingURL=product.d.ts.map
@@ -1,3 +1,3 @@
1
1
  export const SYNORCH_GENERATOR_NAME = "synorch";
2
- export const SYNORCH_VERSION = "0.2.0";
2
+ export const SYNORCH_VERSION = "0.3.0";
3
3
  //# sourceMappingURL=product.js.map
@@ -0,0 +1,21 @@
1
+ /**
2
+ * The lexical half of path containment, shared by every layer that accepts a path from a file
3
+ * the user or an agent wrote: frontmatter references, registry entries and evidence sources.
4
+ *
5
+ * Separators are normalized *before* the absolute-path tests, so a Windows-style `\\server\share`
6
+ * or `C:\secrets` is recognized on POSIX too and cannot slip past a check that only knows `/`.
7
+ * The realpath half — symbolic links and junctions — lives in `FileSystem.assertPathWithinRoot`
8
+ * and is applied by the callers of `resolveSafeRelativePath`.
9
+ */
10
+ /** Collapse separators and redundant `./` segments into a comparable POSIX-shaped path. */
11
+ export declare function normalizeRelativePath(value: string): string;
12
+ /**
13
+ * True when the value can never denote a location *outside* whichever directory it is resolved
14
+ * against: no NUL byte, no drive letter, no UNC root, no leading separator after normalization,
15
+ * and no `..` segment. `.` — the directory itself — satisfies this; a path that must name a file
16
+ * below the directory uses `isSafeDescendantPath` instead.
17
+ */
18
+ export declare function isSafeRelativePath(value: string): boolean;
19
+ /** `isSafeRelativePath`, and strictly below the directory: `.` is not a file. */
20
+ export declare function isSafeDescendantPath(value: string): boolean;
21
+ //# sourceMappingURL=relative-path.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relative-path.d.ts","sourceRoot":"","sources":["../../src/domain/relative-path.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AAEH,2FAA2F;AAC3F,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAQ3D;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAOzD;AAED,iFAAiF;AACjF,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAE3D"}
@@ -0,0 +1,43 @@
1
+ import path from "node:path";
2
+ /**
3
+ * The lexical half of path containment, shared by every layer that accepts a path from a file
4
+ * the user or an agent wrote: frontmatter references, registry entries and evidence sources.
5
+ *
6
+ * Separators are normalized *before* the absolute-path tests, so a Windows-style `\\server\share`
7
+ * or `C:\secrets` is recognized on POSIX too and cannot slip past a check that only knows `/`.
8
+ * The realpath half — symbolic links and junctions — lives in `FileSystem.assertPathWithinRoot`
9
+ * and is applied by the callers of `resolveSafeRelativePath`.
10
+ */
11
+ /** Collapse separators and redundant `./` segments into a comparable POSIX-shaped path. */
12
+ export function normalizeRelativePath(value) {
13
+ const normalized = value
14
+ .trim()
15
+ .replaceAll("\\", "/")
16
+ .replace(/\/+/g, "/")
17
+ .replace(/^(?:\.\/)+/, "")
18
+ .replace(/\/$/, "");
19
+ return normalized || ".";
20
+ }
21
+ /**
22
+ * True when the value can never denote a location *outside* whichever directory it is resolved
23
+ * against: no NUL byte, no drive letter, no UNC root, no leading separator after normalization,
24
+ * and no `..` segment. `.` — the directory itself — satisfies this; a path that must name a file
25
+ * below the directory uses `isSafeDescendantPath` instead.
26
+ */
27
+ export function isSafeRelativePath(value) {
28
+ if (value.includes("\0"))
29
+ return false;
30
+ const normalized = normalizeRelativePath(value);
31
+ if (normalized.length === 0)
32
+ return false;
33
+ if (path.win32.parse(normalized).root !== "")
34
+ return false;
35
+ if (path.posix.isAbsolute(normalized))
36
+ return false;
37
+ return !normalized.split("/").includes("..");
38
+ }
39
+ /** `isSafeRelativePath`, and strictly below the directory: `.` is not a file. */
40
+ export function isSafeDescendantPath(value) {
41
+ return isSafeRelativePath(value) && normalizeRelativePath(value) !== ".";
42
+ }
43
+ //# sourceMappingURL=relative-path.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"relative-path.js","sourceRoot":"","sources":["../../src/domain/relative-path.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,WAAW,CAAC;AAE7B;;;;;;;;GAQG;AAEH,2FAA2F;AAC3F,MAAM,UAAU,qBAAqB,CAAC,KAAa;IACjD,MAAM,UAAU,GAAG,KAAK;SACrB,IAAI,EAAE;SACN,UAAU,CAAC,IAAI,EAAE,GAAG,CAAC;SACrB,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC;SACpB,OAAO,CAAC,YAAY,EAAE,EAAE,CAAC;SACzB,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACtB,OAAO,UAAU,IAAI,GAAG,CAAC;AAC3B,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAa;IAC9C,IAAI,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC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AAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,EAAE,SAAS,SAAS,EAAE,CAAC;CACzC;AAED,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,YAAY,CAAC;AAElD,MAAM,WAAW,eAAe;IAC9B,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC;IACjC,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAC7B,QAAQ,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC;CACpC;AAED,MAAM,WAAW,6BAA6B;IAC5C,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,MAAM,EAAE,SAAS,eAAe,EAAE,CAAC;IAC5C,qEAAqE;IACrE,QAAQ,CAAC,KAAK,EAAE,SAAS,gBAAgB,EAAE,CAAC;CAC7C;AAED,eAAO,MAAM,WAAW,EAAE,SAAS,eAAe,EAUjD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,SAAS,6BAA6B,EAiD1E,CAAC"}
@@ -15,6 +15,7 @@ export const BASE_SKILLS = [
15
15
  baseSkill("debugging"),
16
16
  baseSkill("code-review"),
17
17
  baseSkill("task-conductor"),
18
+ baseSkill("skill-creator"),
18
19
  ];
19
20
  /**
20
21
  * Registry order is public behavior: it provides deterministic output independent
@@ -1 +1 @@
1
- {"version":3,"file":"skill-packs.js","sourceRoot":"","sources":["../../src/domain/skill-packs.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,UAAU;IACV,WAAW;IACX,iBAAiB;IACjB,YAAY;IACZ,YAAY;IACZ,UAAU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