@aitne/shared 0.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.
- package/LICENSE +21 -0
- package/dist/advisor-models.d.ts +34 -0
- package/dist/advisor-models.d.ts.map +1 -0
- package/dist/advisor-models.js +39 -0
- package/dist/advisor-models.js.map +1 -0
- package/dist/agent-identity.d.ts +11 -0
- package/dist/agent-identity.d.ts.map +1 -0
- package/dist/agent-identity.js +29 -0
- package/dist/agent-identity.js.map +1 -0
- package/dist/alerts.d.ts +44 -0
- package/dist/alerts.d.ts.map +1 -0
- package/dist/alerts.js +12 -0
- package/dist/alerts.js.map +1 -0
- package/dist/backend-api-key-config.d.ts +337 -0
- package/dist/backend-api-key-config.d.ts.map +1 -0
- package/dist/backend-api-key-config.js +682 -0
- package/dist/backend-api-key-config.js.map +1 -0
- package/dist/backend.d.ts +93 -0
- package/dist/backend.d.ts.map +1 -0
- package/dist/backend.js +22 -0
- package/dist/backend.js.map +1 -0
- package/dist/branding.d.ts +96 -0
- package/dist/branding.d.ts.map +1 -0
- package/dist/branding.js +102 -0
- package/dist/branding.js.map +1 -0
- package/dist/chat-session-scope.d.ts +14 -0
- package/dist/chat-session-scope.d.ts.map +1 -0
- package/dist/chat-session-scope.js +18 -0
- package/dist/chat-session-scope.js.map +1 -0
- package/dist/date-utils.d.ts +80 -0
- package/dist/date-utils.d.ts.map +1 -0
- package/dist/date-utils.js +187 -0
- package/dist/date-utils.js.map +1 -0
- package/dist/docs-frontmatter.d.ts +51 -0
- package/dist/docs-frontmatter.d.ts.map +1 -0
- package/dist/docs-frontmatter.js +184 -0
- package/dist/docs-frontmatter.js.map +1 -0
- package/dist/docs-schema.d.ts +79 -0
- package/dist/docs-schema.d.ts.map +1 -0
- package/dist/docs-schema.js +135 -0
- package/dist/docs-schema.js.map +1 -0
- package/dist/editable-config-keys.d.ts +14 -0
- package/dist/editable-config-keys.d.ts.map +1 -0
- package/dist/editable-config-keys.js +157 -0
- package/dist/editable-config-keys.js.map +1 -0
- package/dist/exec-with-stdin.d.ts +14 -0
- package/dist/exec-with-stdin.d.ts.map +1 -0
- package/dist/exec-with-stdin.js +35 -0
- package/dist/exec-with-stdin.js.map +1 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +49 -0
- package/dist/index.js.map +1 -0
- package/dist/integrations-snapshot.d.ts +183 -0
- package/dist/integrations-snapshot.d.ts.map +1 -0
- package/dist/integrations-snapshot.js +757 -0
- package/dist/integrations-snapshot.js.map +1 -0
- package/dist/integrations.d.ts +675 -0
- package/dist/integrations.d.ts.map +1 -0
- package/dist/integrations.js +1656 -0
- package/dist/integrations.js.map +1 -0
- package/dist/keychain-helper-client.d.ts +31 -0
- package/dist/keychain-helper-client.d.ts.map +1 -0
- package/dist/keychain-helper-client.js +105 -0
- package/dist/keychain-helper-client.js.map +1 -0
- package/dist/log-entry.d.ts +14 -0
- package/dist/log-entry.d.ts.map +1 -0
- package/dist/log-entry.js +2 -0
- package/dist/log-entry.js.map +1 -0
- package/dist/management-domains.d.ts +369 -0
- package/dist/management-domains.d.ts.map +1 -0
- package/dist/management-domains.js +499 -0
- package/dist/management-domains.js.map +1 -0
- package/dist/process-key.d.ts +67 -0
- package/dist/process-key.d.ts.map +1 -0
- package/dist/process-key.js +366 -0
- package/dist/process-key.js.map +1 -0
- package/dist/schemas.d.ts +267 -0
- package/dist/schemas.d.ts.map +1 -0
- package/dist/schemas.js +271 -0
- package/dist/schemas.js.map +1 -0
- package/dist/secret-client-factory.d.ts +16 -0
- package/dist/secret-client-factory.d.ts.map +1 -0
- package/dist/secret-client-factory.js +111 -0
- package/dist/secret-client-factory.js.map +1 -0
- package/dist/secret-client-file.d.ts +51 -0
- package/dist/secret-client-file.d.ts.map +1 -0
- package/dist/secret-client-file.js +160 -0
- package/dist/secret-client-file.js.map +1 -0
- package/dist/secret-client-linux.d.ts +26 -0
- package/dist/secret-client-linux.d.ts.map +1 -0
- package/dist/secret-client-linux.js +63 -0
- package/dist/secret-client-linux.js.map +1 -0
- package/dist/secret-client-windows.d.ts +37 -0
- package/dist/secret-client-windows.d.ts.map +1 -0
- package/dist/secret-client-windows.js +82 -0
- package/dist/secret-client-windows.js.map +1 -0
- package/dist/secret-redaction.d.ts +3 -0
- package/dist/secret-redaction.d.ts.map +1 -0
- package/dist/secret-redaction.js +31 -0
- package/dist/secret-redaction.js.map +1 -0
- package/dist/skill-curation/decision-language.d.ts +6 -0
- package/dist/skill-curation/decision-language.d.ts.map +1 -0
- package/dist/skill-curation/decision-language.js +38 -0
- package/dist/skill-curation/decision-language.js.map +1 -0
- package/dist/skill-curation/schemas.d.ts +461 -0
- package/dist/skill-curation/schemas.d.ts.map +1 -0
- package/dist/skill-curation/schemas.js +211 -0
- package/dist/skill-curation/schemas.js.map +1 -0
- package/dist/types.d.ts +204 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +54 -0
- package/dist/types.js.map +1 -0
- package/package.json +50 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"backend-api-key-config.js","sourceRoot":"","sources":["../src/backend-api-key-config.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,wEAAwE;AAExE,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,WAAW;IACX,SAAS;IACT,QAAQ;IACR,SAAS;CACD,CAAC;AAGX,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,QAAQ,EAAE,cAAc,CAAU,CAAC;AAG3E,MAAM,CAAC,MAAM,wBAAwB,GAAG,CAAC,QAAQ,EAAE,eAAe,CAAU,CAAC;AAQ7E,MAAM,CAAC,MAAM,4BAA4B,GAGrC;IACF,MAAM,EAAE,wBAAwB;IAChC,KAAK,EAAE,uBAAuB;IAC9B,MAAM,EAAE,wBAAwB;CACjC,CAAC;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M,CAAC,OAAO,CAAC,CAAC;oBACpC,IAAI,GAAG,CAAC,QAAQ,KAAK,QAAQ,IAAI,GAAG,CAAC,QAAQ,KAAK,OAAO,EAAE,CAAC;wBAC1D,OAAO,0CAA0C,CAAC;oBACpD,CAAC;gBACH,CAAC;gBAAC,MAAM,CAAC;oBACP,OAAO,sCAAsC,CAAC;gBAChD,CAAC;YACH,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;QACD,KAAK,eAAe,CAAC,CAAC,CAAC;YACrB,IAAI,MAAM,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,CAAC;gBAC/D,OAAO,iCAAiC,CAAC;YAC3C,CAAC;YACD,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC;gBAC7D,OAAO,oDAAoD,CAAC;YAC9D,CAAC;YACD,IACE,MAAM,CAAC,QAAQ,KAAK,SAAS;mBAC1B,CAAC,uBAAuB,CAAC,MAAM,CAAC,MAAM,CAAC,EAC1C,CAAC;gBACD,OAAO,4DAA4D,CAAC;YACtE,CAAC;YACD,OAAO,IAAI,CAAC;QACd,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
export declare const BACKEND_IDS: readonly ["claude", "codex", "gemini"];
|
|
2
|
+
export type BackendId = (typeof BACKEND_IDS)[number];
|
|
3
|
+
export type BackendCostSource = "sdk" | "litellm" | "hardcoded";
|
|
4
|
+
/**
|
|
5
|
+
* Per-backend tool/sandbox posture. Shared by the daemon cores
|
|
6
|
+
* (via runtimeSettings.{claude,codex,gemini}ExecutionPermissionMode) and
|
|
7
|
+
* the dashboard (backend-settings card + ConfigResponse).
|
|
8
|
+
*
|
|
9
|
+
* - `"strict"` — shipped defense-in-depth guardrails for the given backend.
|
|
10
|
+
* - `"allow"` — strong permission mode: tool/sandbox restrictions off.
|
|
11
|
+
* Shell-level context-dir and sensitive-path blocks stay enforced on
|
|
12
|
+
* Claude + Gemini; Codex in allow mode runs under
|
|
13
|
+
* `--dangerously-bypass-approvals-and-sandbox` and cannot enforce them.
|
|
14
|
+
*/
|
|
15
|
+
export declare const EXECUTION_PERMISSION_MODES: readonly ["strict", "allow"];
|
|
16
|
+
export type ExecutionPermissionMode = (typeof EXECUTION_PERMISSION_MODES)[number];
|
|
17
|
+
/**
|
|
18
|
+
* Three-tier model classification used across backends.
|
|
19
|
+
*
|
|
20
|
+
* - `lite` — cheapest, fastest model. Used for delegated-mode simple
|
|
21
|
+
* queries (mail polling, gmail classification, github/git event triage,
|
|
22
|
+
* integration drift sync, calendar change probes). For Claude this is
|
|
23
|
+
* Haiku 4.5; for Codex it's gpt-5.4-mini; for Gemini it's the flash-lite
|
|
24
|
+
* preview. Bound by a tight per-call envelope.
|
|
25
|
+
* - `medium` — main agent surfaces (DMs, dashboard chat, hourly check,
|
|
26
|
+
* morning/evening/weekly/monthly reviews, scheduled DM tasks). Default
|
|
27
|
+
* tier for owner-in-the-loop work. For Claude this is Sonnet 4.6.
|
|
28
|
+
* - `high` — heaviest reasoning workloads (advisor escalation, knowledge
|
|
29
|
+
* import, generative routines whose output feeds 24h of downstream
|
|
30
|
+
* activity). Operators opt in per process key from `/settings/models`.
|
|
31
|
+
* For Claude this is Opus 4.7.
|
|
32
|
+
*
|
|
33
|
+
* Replaces the legacy two-value `"light" | "heavy"` enum (2026-05). The
|
|
34
|
+
* previous `light` collapsed delegated-and-DM into one bucket; splitting
|
|
35
|
+
* out `lite` lets delegated proxy invocations default to Haiku without
|
|
36
|
+
* dragging the main DM tier down with it.
|
|
37
|
+
*/
|
|
38
|
+
export type BackendModelTier = "lite" | "medium" | "high";
|
|
39
|
+
export interface BackendUsage {
|
|
40
|
+
/**
|
|
41
|
+
* Non-cached billable input tokens. Backends whose raw usage reports
|
|
42
|
+
* cached tokens as a subset of total input must subtract the cached portion
|
|
43
|
+
* before populating this field.
|
|
44
|
+
*/
|
|
45
|
+
inputTokens: number;
|
|
46
|
+
outputTokens: number;
|
|
47
|
+
cacheCreationInputTokens: number;
|
|
48
|
+
cacheReadInputTokens: number;
|
|
49
|
+
costUsd?: number;
|
|
50
|
+
costSource?: BackendCostSource;
|
|
51
|
+
}
|
|
52
|
+
export interface BackendModel {
|
|
53
|
+
backendId: BackendId;
|
|
54
|
+
modelId: string;
|
|
55
|
+
label: string;
|
|
56
|
+
displayName?: string;
|
|
57
|
+
tier: BackendModelTier;
|
|
58
|
+
available: boolean;
|
|
59
|
+
supportsToolUse?: boolean;
|
|
60
|
+
supportsStreaming?: boolean;
|
|
61
|
+
supportsPromptCaching?: boolean;
|
|
62
|
+
usdPer1kIn?: number;
|
|
63
|
+
usdPer1kOut?: number;
|
|
64
|
+
usdPer1kCacheRead?: number;
|
|
65
|
+
usdPer1kCacheCreate?: number;
|
|
66
|
+
usdPer1kInAboveThreshold?: number;
|
|
67
|
+
usdPer1kOutAboveThreshold?: number;
|
|
68
|
+
usdPer1kCacheReadAboveThreshold?: number;
|
|
69
|
+
usdPer1kCacheCreateAboveThreshold?: number;
|
|
70
|
+
inputCostThresholdTokens?: number;
|
|
71
|
+
pricingThresholdMode?: "marginal" | "context";
|
|
72
|
+
maxInputTokens?: number;
|
|
73
|
+
maxOutputTokens?: number;
|
|
74
|
+
/**
|
|
75
|
+
* Legacy/superseded model kept in the registry so existing DB rows stay
|
|
76
|
+
* valid but sorted to the end of UI pickers. New defaults should pick a
|
|
77
|
+
* non-deprecated model in the same tier.
|
|
78
|
+
*/
|
|
79
|
+
deprecated?: boolean;
|
|
80
|
+
/**
|
|
81
|
+
* Pin registry pricing as the authoritative source for this model. When set,
|
|
82
|
+
* `PriceFetcher` ignores LiteLLM cache entries that disagree. Use for models
|
|
83
|
+
* where upstream community pricing data is known stale or wrong (e.g.
|
|
84
|
+
* Anthropic's newest Opus tier where LiteLLM lags). Without this flag the
|
|
85
|
+
* LiteLLM cache wins, which is the right default for the long tail.
|
|
86
|
+
*/
|
|
87
|
+
pricingTrusted?: boolean;
|
|
88
|
+
}
|
|
89
|
+
export declare function isBackendId(value: string): value is BackendId;
|
|
90
|
+
export declare function getBackendIds(): readonly BackendId[];
|
|
91
|
+
/** Backends that support web search tools. Codex deprecated its web search feature flags. */
|
|
92
|
+
export declare const WEB_SEARCH_CAPABLE_BACKENDS: ReadonlySet<BackendId>;
|
|
93
|
+
//# sourceMappingURL=backend.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../src/backend.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,wCAAyC,CAAC;AAElE,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AAErD,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,SAAS,GAAG,WAAW,CAAC;AAEhE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,0BAA0B,8BAA+B,CAAC;AACvE,MAAM,MAAM,uBAAuB,GACjC,CAAC,OAAO,0BAA0B,CAAC,CAAC,MAAM,CAAC,CAAC;AAE9C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE1D,MAAM,WAAW,YAAY;IAC3B;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,wBAAwB,EAAE,MAAM,CAAC;IACjC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,iBAAiB,CAAC;CAChC;AAED,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,SAAS,CAAC;IACrB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,gBAAgB,CAAC;IACvB,SAAS,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,yBAAyB,CAAC,EAAE,MAAM,CAAC;IACnC,+BAA+B,CAAC,EAAE,MAAM,CAAC;IACzC,iCAAiC,CAAC,EAAE,MAAM,CAAC;IAC3C,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAClC,oBAAoB,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAC9C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;;OAIG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,SAAS,CAE7D;AAED,wBAAgB,aAAa,IAAI,SAAS,SAAS,EAAE,CAEpD;AAED,6FAA6F;AAC7F,eAAO,MAAM,2BAA2B,EAAE,WAAW,CAAC,SAAS,CAA4C,CAAC"}
|
package/dist/backend.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export const BACKEND_IDS = ["claude", "codex", "gemini"];
|
|
2
|
+
/**
|
|
3
|
+
* Per-backend tool/sandbox posture. Shared by the daemon cores
|
|
4
|
+
* (via runtimeSettings.{claude,codex,gemini}ExecutionPermissionMode) and
|
|
5
|
+
* the dashboard (backend-settings card + ConfigResponse).
|
|
6
|
+
*
|
|
7
|
+
* - `"strict"` — shipped defense-in-depth guardrails for the given backend.
|
|
8
|
+
* - `"allow"` — strong permission mode: tool/sandbox restrictions off.
|
|
9
|
+
* Shell-level context-dir and sensitive-path blocks stay enforced on
|
|
10
|
+
* Claude + Gemini; Codex in allow mode runs under
|
|
11
|
+
* `--dangerously-bypass-approvals-and-sandbox` and cannot enforce them.
|
|
12
|
+
*/
|
|
13
|
+
export const EXECUTION_PERMISSION_MODES = ["strict", "allow"];
|
|
14
|
+
export function isBackendId(value) {
|
|
15
|
+
return BACKEND_IDS.includes(value);
|
|
16
|
+
}
|
|
17
|
+
export function getBackendIds() {
|
|
18
|
+
return BACKEND_IDS;
|
|
19
|
+
}
|
|
20
|
+
/** Backends that support web search tools. Codex deprecated its web search feature flags. */
|
|
21
|
+
export const WEB_SEARCH_CAPABLE_BACKENDS = new Set(["claude", "gemini"]);
|
|
22
|
+
//# sourceMappingURL=backend.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"backend.js","sourceRoot":"","sources":["../src/backend.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,QAAQ,CAAU,CAAC;AAMlE;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,QAAQ,EAAE,OAAO,CAAU,CAAC;AA+EvE,MAAM,UAAU,WAAW,CAAC,KAAa;IACvC,OAAO,WAAW,CAAC,QAAQ,CAAC,KAAkB,CAAC,CAAC;AAClD,CAAC;AAED,MAAM,UAAU,aAAa;IAC3B,OAAO,WAAW,CAAC;AACrB,CAAC;AAED,6FAA6F;AAC7F,MAAM,CAAC,MAAM,2BAA2B,GAA2B,IAAI,GAAG,CAAY,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single source of truth for product brand identity.
|
|
3
|
+
*
|
|
4
|
+
* Three tiers — keep them distinct:
|
|
5
|
+
*
|
|
6
|
+
* APP_NAME The product / brand. Static. What the software is called.
|
|
7
|
+
* Imported by TS code (env-writer, Slack manifest, dashboard
|
|
8
|
+
* title, daemon startup logs, the CLI instruction-file
|
|
9
|
+
* header) and substituted into the `{APP_NAME}` token in
|
|
10
|
+
* markdown templates (task-flows, agent-profiles, skills)
|
|
11
|
+
* via `substituteBrandTokens` at materialization time.
|
|
12
|
+
*
|
|
13
|
+
* AGENT_ROLE_DESCRIPTOR The LLM's role anchor. "personal agent" is a high-prior
|
|
14
|
+
* phrase in instruction-tuning data; keeping it stable
|
|
15
|
+
* under rebrands preserves role activation independent of
|
|
16
|
+
* the proper-noun product name.
|
|
17
|
+
*
|
|
18
|
+
* agentDisplayName User-customizable proper noun the agent uses to sign
|
|
19
|
+
* messages. DB-backed setting (PA_AGENT_DISPLAY_NAME env
|
|
20
|
+
* override). Defaults to APP_NAME but the user may rename
|
|
21
|
+
* their instance to anything ("Sage", "Alfred", etc.).
|
|
22
|
+
* Defined in agent-identity.ts.
|
|
23
|
+
*
|
|
24
|
+
* To rebrand the product, two coordinated changes are required:
|
|
25
|
+
*
|
|
26
|
+
* 1. Update APP_NAME below. This propagates automatically through:
|
|
27
|
+
* - TS imports (search the workspace for `APP_NAME` from this module).
|
|
28
|
+
* - The `{APP_NAME}` token in agent-assets/{agent-profiles,task-flows,
|
|
29
|
+
* skills}/, resolved at runtime by:
|
|
30
|
+
* · prompts.ts loadFlow() / loadFlowVariant() (task-flows)
|
|
31
|
+
* · skills-compiler.ts read-from-src wraps + post-cpSync walk +
|
|
32
|
+
* partial/reference inliner wraps (agent-profiles, skills)
|
|
33
|
+
*
|
|
34
|
+
* 2. Sweep human-facing markdown that does NOT flow through token resolution
|
|
35
|
+
* (those files are read by humans on GitHub and by FTS5 indexers, both of
|
|
36
|
+
* which want the literal name on disk). One-liner:
|
|
37
|
+
* rg -l '<old-name>' agent-assets/docs/ agent-assets/templates/ README.md \
|
|
38
|
+
* | xargs sed -i '' 's/<old-name>/<new-name>/g'
|
|
39
|
+
* Then restart the daemon so the docs FTS5 index reseeds with the new
|
|
40
|
+
* content. (`docs/design/` is intentionally out of scope — historical
|
|
41
|
+
* design corpus, not user-facing.)
|
|
42
|
+
*
|
|
43
|
+
* Existing users who explicitly set agentDisplayName (e.g. "PersonalAgent" from
|
|
44
|
+
* a v1 install) keep their value because DB > default. Do not "fix" that.
|
|
45
|
+
*
|
|
46
|
+
* The OS-keychain label prefix (`secret-client-linux.ts` and the macOS
|
|
47
|
+
* Keychain analogue) is intentionally NOT tied to APP_NAME. It is a stable
|
|
48
|
+
* interface — changing it would orphan every secret stored under the old
|
|
49
|
+
* prefix and require users to re-enter all credentials.
|
|
50
|
+
*/
|
|
51
|
+
export declare const APP_NAME = "Aitne";
|
|
52
|
+
export declare const AGENT_ROLE_DESCRIPTOR = "personal agent";
|
|
53
|
+
/**
|
|
54
|
+
* Short tagline used wherever the brand needs a one-line hook. "Aitne" alone
|
|
55
|
+
* is a coined word with no prior — the tagline tells a first-time reader
|
|
56
|
+
* what the product feels like in five words. Two parallel clauses, each
|
|
57
|
+
* ending with a terminal period; downstream concatenation must defer to
|
|
58
|
+
* `joinTaglineWithSentence` to avoid `..` doubling.
|
|
59
|
+
*
|
|
60
|
+
* The role anchor ("personal agent") is NOT carried by this tagline — it
|
|
61
|
+
* lives in `AGENT_ROLE_DESCRIPTOR` and is emitted into every prompt via the
|
|
62
|
+
* `<agent_identity>` block, which is what actually drives LLM activation.
|
|
63
|
+
* Decoupling lets the tagline be punchy without weakening role anchoring.
|
|
64
|
+
*
|
|
65
|
+
* Use cases: README.md subtitle, docs landing page lead, dashboard welcome
|
|
66
|
+
* heading, OS app metadata. Prefer plain `APP_NAME` in body text once the
|
|
67
|
+
* brand has been introduced — repeating the tagline reads as marketing copy.
|
|
68
|
+
*/
|
|
69
|
+
export declare const APP_TAGLINE = "Always on. Always yours.";
|
|
70
|
+
/** `<APP_NAME> — <APP_TAGLINE>` — the canonical brand-with-tagline form. */
|
|
71
|
+
export declare const APP_NAME_WITH_TAGLINE = "Aitne \u2014 Always on. Always yours.";
|
|
72
|
+
/**
|
|
73
|
+
* Combine tagline with a trailing description sentence without producing
|
|
74
|
+
* `..` when the tagline already ends in a period (e.g. "Always on. Always
|
|
75
|
+
* yours." + ". Monitor..." would otherwise read "yours.. Monitor"). Used by
|
|
76
|
+
* `<meta description>` and any markdown lead that needs a punctuation-safe
|
|
77
|
+
* concatenation.
|
|
78
|
+
*/
|
|
79
|
+
export declare function joinTaglineWithSentence(tagline: string, sentence: string): string;
|
|
80
|
+
/**
|
|
81
|
+
* Replace `{APP_NAME}` tokens in markdown content read from agent-assets/.
|
|
82
|
+
* Called by prompts.ts (task-flow loader) and skills-compiler.ts (agent-profile
|
|
83
|
+
* and skill materializer) at the disk-read boundary, so downstream transforms
|
|
84
|
+
* see the resolved product name.
|
|
85
|
+
*
|
|
86
|
+
* Unknown tokens like `{event_data[X]}` and `{context}` are left untouched —
|
|
87
|
+
* those are resolved later by `resolveTemplate` in prompt-utils.ts.
|
|
88
|
+
*
|
|
89
|
+
* Uses a function replacer so a future APP_NAME containing `$&`, `$1`, etc.
|
|
90
|
+
* (regex back-reference syntax) is inserted verbatim instead of being
|
|
91
|
+
* interpreted by `String.prototype.replace`. Defensive — the current value
|
|
92
|
+
* "Aitne" has no special chars, but the rebrand contract is "change one
|
|
93
|
+
* constant," not "change one constant AND audit it for $-escapes."
|
|
94
|
+
*/
|
|
95
|
+
export declare function substituteBrandTokens(content: string): string;
|
|
96
|
+
//# sourceMappingURL=branding.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"branding.d.ts","sourceRoot":"","sources":["../src/branding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,eAAO,MAAM,QAAQ,UAAU,CAAC;AAEhC,eAAO,MAAM,qBAAqB,mBAAmB,CAAC;AAEtD;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,WAAW,6BAA6B,CAAC;AAEtD,4EAA4E;AAC5E,eAAO,MAAM,qBAAqB,0CAAiC,CAAC;AAEpE;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAIjF;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE7D"}
|
package/dist/branding.js
ADDED
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Single source of truth for product brand identity.
|
|
3
|
+
*
|
|
4
|
+
* Three tiers — keep them distinct:
|
|
5
|
+
*
|
|
6
|
+
* APP_NAME The product / brand. Static. What the software is called.
|
|
7
|
+
* Imported by TS code (env-writer, Slack manifest, dashboard
|
|
8
|
+
* title, daemon startup logs, the CLI instruction-file
|
|
9
|
+
* header) and substituted into the `{APP_NAME}` token in
|
|
10
|
+
* markdown templates (task-flows, agent-profiles, skills)
|
|
11
|
+
* via `substituteBrandTokens` at materialization time.
|
|
12
|
+
*
|
|
13
|
+
* AGENT_ROLE_DESCRIPTOR The LLM's role anchor. "personal agent" is a high-prior
|
|
14
|
+
* phrase in instruction-tuning data; keeping it stable
|
|
15
|
+
* under rebrands preserves role activation independent of
|
|
16
|
+
* the proper-noun product name.
|
|
17
|
+
*
|
|
18
|
+
* agentDisplayName User-customizable proper noun the agent uses to sign
|
|
19
|
+
* messages. DB-backed setting (PA_AGENT_DISPLAY_NAME env
|
|
20
|
+
* override). Defaults to APP_NAME but the user may rename
|
|
21
|
+
* their instance to anything ("Sage", "Alfred", etc.).
|
|
22
|
+
* Defined in agent-identity.ts.
|
|
23
|
+
*
|
|
24
|
+
* To rebrand the product, two coordinated changes are required:
|
|
25
|
+
*
|
|
26
|
+
* 1. Update APP_NAME below. This propagates automatically through:
|
|
27
|
+
* - TS imports (search the workspace for `APP_NAME` from this module).
|
|
28
|
+
* - The `{APP_NAME}` token in agent-assets/{agent-profiles,task-flows,
|
|
29
|
+
* skills}/, resolved at runtime by:
|
|
30
|
+
* · prompts.ts loadFlow() / loadFlowVariant() (task-flows)
|
|
31
|
+
* · skills-compiler.ts read-from-src wraps + post-cpSync walk +
|
|
32
|
+
* partial/reference inliner wraps (agent-profiles, skills)
|
|
33
|
+
*
|
|
34
|
+
* 2. Sweep human-facing markdown that does NOT flow through token resolution
|
|
35
|
+
* (those files are read by humans on GitHub and by FTS5 indexers, both of
|
|
36
|
+
* which want the literal name on disk). One-liner:
|
|
37
|
+
* rg -l '<old-name>' agent-assets/docs/ agent-assets/templates/ README.md \
|
|
38
|
+
* | xargs sed -i '' 's/<old-name>/<new-name>/g'
|
|
39
|
+
* Then restart the daemon so the docs FTS5 index reseeds with the new
|
|
40
|
+
* content. (`docs/design/` is intentionally out of scope — historical
|
|
41
|
+
* design corpus, not user-facing.)
|
|
42
|
+
*
|
|
43
|
+
* Existing users who explicitly set agentDisplayName (e.g. "PersonalAgent" from
|
|
44
|
+
* a v1 install) keep their value because DB > default. Do not "fix" that.
|
|
45
|
+
*
|
|
46
|
+
* The OS-keychain label prefix (`secret-client-linux.ts` and the macOS
|
|
47
|
+
* Keychain analogue) is intentionally NOT tied to APP_NAME. It is a stable
|
|
48
|
+
* interface — changing it would orphan every secret stored under the old
|
|
49
|
+
* prefix and require users to re-enter all credentials.
|
|
50
|
+
*/
|
|
51
|
+
export const APP_NAME = "Aitne";
|
|
52
|
+
export const AGENT_ROLE_DESCRIPTOR = "personal agent";
|
|
53
|
+
/**
|
|
54
|
+
* Short tagline used wherever the brand needs a one-line hook. "Aitne" alone
|
|
55
|
+
* is a coined word with no prior — the tagline tells a first-time reader
|
|
56
|
+
* what the product feels like in five words. Two parallel clauses, each
|
|
57
|
+
* ending with a terminal period; downstream concatenation must defer to
|
|
58
|
+
* `joinTaglineWithSentence` to avoid `..` doubling.
|
|
59
|
+
*
|
|
60
|
+
* The role anchor ("personal agent") is NOT carried by this tagline — it
|
|
61
|
+
* lives in `AGENT_ROLE_DESCRIPTOR` and is emitted into every prompt via the
|
|
62
|
+
* `<agent_identity>` block, which is what actually drives LLM activation.
|
|
63
|
+
* Decoupling lets the tagline be punchy without weakening role anchoring.
|
|
64
|
+
*
|
|
65
|
+
* Use cases: README.md subtitle, docs landing page lead, dashboard welcome
|
|
66
|
+
* heading, OS app metadata. Prefer plain `APP_NAME` in body text once the
|
|
67
|
+
* brand has been introduced — repeating the tagline reads as marketing copy.
|
|
68
|
+
*/
|
|
69
|
+
export const APP_TAGLINE = "Always on. Always yours.";
|
|
70
|
+
/** `<APP_NAME> — <APP_TAGLINE>` — the canonical brand-with-tagline form. */
|
|
71
|
+
export const APP_NAME_WITH_TAGLINE = `${APP_NAME} — ${APP_TAGLINE}`;
|
|
72
|
+
/**
|
|
73
|
+
* Combine tagline with a trailing description sentence without producing
|
|
74
|
+
* `..` when the tagline already ends in a period (e.g. "Always on. Always
|
|
75
|
+
* yours." + ". Monitor..." would otherwise read "yours.. Monitor"). Used by
|
|
76
|
+
* `<meta description>` and any markdown lead that needs a punctuation-safe
|
|
77
|
+
* concatenation.
|
|
78
|
+
*/
|
|
79
|
+
export function joinTaglineWithSentence(tagline, sentence) {
|
|
80
|
+
const trimmed = tagline.trimEnd();
|
|
81
|
+
const ends = /[.!?…]$/.test(trimmed);
|
|
82
|
+
return `${trimmed}${ends ? "" : "."} ${sentence}`;
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Replace `{APP_NAME}` tokens in markdown content read from agent-assets/.
|
|
86
|
+
* Called by prompts.ts (task-flow loader) and skills-compiler.ts (agent-profile
|
|
87
|
+
* and skill materializer) at the disk-read boundary, so downstream transforms
|
|
88
|
+
* see the resolved product name.
|
|
89
|
+
*
|
|
90
|
+
* Unknown tokens like `{event_data[X]}` and `{context}` are left untouched —
|
|
91
|
+
* those are resolved later by `resolveTemplate` in prompt-utils.ts.
|
|
92
|
+
*
|
|
93
|
+
* Uses a function replacer so a future APP_NAME containing `$&`, `$1`, etc.
|
|
94
|
+
* (regex back-reference syntax) is inserted verbatim instead of being
|
|
95
|
+
* interpreted by `String.prototype.replace`. Defensive — the current value
|
|
96
|
+
* "Aitne" has no special chars, but the rebrand contract is "change one
|
|
97
|
+
* constant," not "change one constant AND audit it for $-escapes."
|
|
98
|
+
*/
|
|
99
|
+
export function substituteBrandTokens(content) {
|
|
100
|
+
return content.replace(/\{APP_NAME\}/g, () => APP_NAME);
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=branding.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"branding.js","sourceRoot":"","sources":["../src/branding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiDG;AACH,MAAM,CAAC,MAAM,QAAQ,GAAG,OAAO,CAAC;AAEhC,MAAM,CAAC,MAAM,qBAAqB,GAAG,gBAAgB,CAAC;AAEtD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG,0BAA0B,CAAC;AAEtD,4EAA4E;AAC5E,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,QAAQ,MAAM,WAAW,EAAE,CAAC;AAEpE;;;;;;GAMG;AACH,MAAM,UAAU,uBAAuB,CAAC,OAAe,EAAE,QAAgB;IACvE,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAClC,MAAM,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACrC,OAAO,GAAG,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,QAAQ,EAAE,CAAC;AACpD,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,qBAAqB,CAAC,OAAe;IACnD,OAAO,OAAO,CAAC,OAAO,CAAC,eAAe,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,CAAC;AAC1D,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scopes that the dashboard chat sidebar shows and (consequently) the
|
|
3
|
+
* DELETE /api/conversations endpoints operate on.
|
|
4
|
+
*
|
|
5
|
+
* Shared so the dashboard's `useConversations({ scope: ... })` filter and
|
|
6
|
+
* the daemon's `deleteAllChatSidebarSessions` helper cannot drift: if one
|
|
7
|
+
* side includes an extra scope, the other must follow.
|
|
8
|
+
*/
|
|
9
|
+
export declare const CHAT_SIDEBAR_SCOPES: readonly ["dashboard_chat", "owner_dm"];
|
|
10
|
+
export type ChatSidebarScope = (typeof CHAT_SIDEBAR_SCOPES)[number];
|
|
11
|
+
/** Comma-joined form for the `scope` query param on GET /api/conversations. */
|
|
12
|
+
export declare const CHAT_SIDEBAR_SCOPE_PARAM: string;
|
|
13
|
+
export declare function isChatSidebarScope(scope: string): scope is ChatSidebarScope;
|
|
14
|
+
//# sourceMappingURL=chat-session-scope.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-session-scope.d.ts","sourceRoot":"","sources":["../src/chat-session-scope.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,eAAO,MAAM,mBAAmB,yCAGtB,CAAC;AAEX,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpE,+EAA+E;AAC/E,eAAO,MAAM,wBAAwB,QAAgC,CAAC;AAEtE,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,gBAAgB,CAE3E"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Scopes that the dashboard chat sidebar shows and (consequently) the
|
|
3
|
+
* DELETE /api/conversations endpoints operate on.
|
|
4
|
+
*
|
|
5
|
+
* Shared so the dashboard's `useConversations({ scope: ... })` filter and
|
|
6
|
+
* the daemon's `deleteAllChatSidebarSessions` helper cannot drift: if one
|
|
7
|
+
* side includes an extra scope, the other must follow.
|
|
8
|
+
*/
|
|
9
|
+
export const CHAT_SIDEBAR_SCOPES = [
|
|
10
|
+
"dashboard_chat",
|
|
11
|
+
"owner_dm",
|
|
12
|
+
];
|
|
13
|
+
/** Comma-joined form for the `scope` query param on GET /api/conversations. */
|
|
14
|
+
export const CHAT_SIDEBAR_SCOPE_PARAM = CHAT_SIDEBAR_SCOPES.join(",");
|
|
15
|
+
export function isChatSidebarScope(scope) {
|
|
16
|
+
return CHAT_SIDEBAR_SCOPES.includes(scope);
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=chat-session-scope.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"chat-session-scope.js","sourceRoot":"","sources":["../src/chat-session-scope.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,mBAAmB,GAAG;IACjC,gBAAgB;IAChB,UAAU;CACF,CAAC;AAIX,+EAA+E;AAC/E,MAAM,CAAC,MAAM,wBAAwB,GAAG,mBAAmB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAEtE,MAAM,UAAU,kBAAkB,CAAC,KAAa;IAC9C,OAAQ,mBAAyC,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AACpE,CAAC"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Timezone-aware date utilities for the Aitne system.
|
|
3
|
+
*
|
|
4
|
+
* The "agent day" starts at `dayBoundaryHour` (default 04:00) in the
|
|
5
|
+
* configured timezone, NOT at UTC midnight. All SQL queries that reference
|
|
6
|
+
* "today" must use getAgentDayBoundsUtc() to get correct UTC boundaries.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Get YYYY-MM-DD string in the specified (or system-local) timezone.
|
|
10
|
+
*
|
|
11
|
+
* Unlike `date.toISOString().slice(0, 10)` which returns the UTC date,
|
|
12
|
+
* this respects the given timezone (or falls back to system local).
|
|
13
|
+
*/
|
|
14
|
+
export declare function localDateStr(date: Date, timezone?: string): string;
|
|
15
|
+
/**
|
|
16
|
+
* Get time components in the specified timezone.
|
|
17
|
+
* Falls back to system timezone if timezone is empty/undefined.
|
|
18
|
+
*/
|
|
19
|
+
export declare function nowInTimezone(timezone: string | undefined, now?: Date): {
|
|
20
|
+
hours: number;
|
|
21
|
+
minutes: number;
|
|
22
|
+
year: number;
|
|
23
|
+
month: number;
|
|
24
|
+
day: number;
|
|
25
|
+
dayOfWeek: number;
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Compute the UTC boundaries of the current "agent day".
|
|
29
|
+
*
|
|
30
|
+
* An agent day starts at `dayBoundaryHour` in the configured timezone.
|
|
31
|
+
* For example, with timezone "America/New_York" and dayBoundaryHour 4:
|
|
32
|
+
* - Agent day starts at 04:00 ET = 09:00 UTC (current day, EST)
|
|
33
|
+
* - Agent day ends at 04:00 ET = 09:00 UTC (next day, EST)
|
|
34
|
+
*
|
|
35
|
+
* @returns start (inclusive) and end (exclusive) as 'YYYY-MM-DD HH:MM:SS'
|
|
36
|
+
* UTC strings suitable for SQLite WHERE clauses.
|
|
37
|
+
*/
|
|
38
|
+
export declare function getAgentDayBoundsUtc(timezone: string | undefined, dayBoundaryHour: number, now?: Date): {
|
|
39
|
+
start: string;
|
|
40
|
+
end: string;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Return the local YYYY-MM-DD label of the current agent day.
|
|
44
|
+
*
|
|
45
|
+
* With a 04:00 boundary, times between 00:00 and 03:59 belong to the
|
|
46
|
+
* previous agent day and therefore return the previous local date.
|
|
47
|
+
*/
|
|
48
|
+
export declare function getAgentDayDateStr(timezone: string | undefined, dayBoundaryHour: number, now?: Date): string;
|
|
49
|
+
/**
|
|
50
|
+
* Return minutes elapsed since the start of the current agent day.
|
|
51
|
+
*
|
|
52
|
+
* Example: with a 04:00 boundary, 05:30 returns 90 and 02:15 returns 1335.
|
|
53
|
+
*/
|
|
54
|
+
export declare function getAgentDayProgressMinutes(timezone: string | undefined, dayBoundaryHour: number, now?: Date): number;
|
|
55
|
+
/**
|
|
56
|
+
* Project a candidate Date forward to the next start of an active-hours
|
|
57
|
+
* window in the configured timezone. The window is `[startHour, endHour)`
|
|
58
|
+
* in local time; `endHour=24` is treated as exclusive (no shift for
|
|
59
|
+
* candidate hour 23).
|
|
60
|
+
*
|
|
61
|
+
* - Candidate's local hour already inside the window → returns candidate
|
|
62
|
+
* unchanged.
|
|
63
|
+
* - Local hour `< startHour` → returns today's `startHour:00:00.000` local.
|
|
64
|
+
* - Local hour `>= endHour` → returns tomorrow's `startHour:00:00.000`
|
|
65
|
+
* local.
|
|
66
|
+
*
|
|
67
|
+
* Mirrors the timezone-shift / DST-recompute pattern used in
|
|
68
|
+
* `getAgentDayBoundsUtc` so cross-DST transitions land on the correct
|
|
69
|
+
* wall-clock hour rather than an hour offset.
|
|
70
|
+
*/
|
|
71
|
+
export declare function nextActiveHoursStart(candidate: Date, timezone: string | undefined, startHour: number, endHour: number): Date;
|
|
72
|
+
/** Format a Date as 'YYYY-MM-DD HH:MM:SS' UTC string for SQLite. */
|
|
73
|
+
export declare function formatSqliteDatetime(date: Date): string;
|
|
74
|
+
/**
|
|
75
|
+
* Parse a SQLite UTC datetime string ('YYYY-MM-DD HH:MM:SS') into epoch ms.
|
|
76
|
+
* More robust than ad-hoc `new Date(s + "Z")` — explicitly normalizes the
|
|
77
|
+
* format before parsing.
|
|
78
|
+
*/
|
|
79
|
+
export declare function parseSqliteUtcMs(s: string): number;
|
|
80
|
+
//# sourceMappingURL=date-utils.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-utils.d.ts","sourceRoot":"","sources":["../src/date-utils.ts"],"names":[],"mappings":"AAAA;;;;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